SQLite Forum

sqlite3 LIKE clause with parameters for c api
Login
What is the correct syntax for an sql statement that contains % in conjunction with the LIKE operator and can be used for c api functions like sqlite3_prepare_v2() ?
I tried

"SELECT ... FROM ... WHERE col LIKE '%?1%';"
Or
"SELECT ... FROM ... WHERE col LIKE '%%?1%%';"
Or
"SELECT ... FROM ... WHERE col LIKE '%%'+?1+'%%';"
Or
Many others, but nothing worked.

Any suggestion would be very apreciate.

Cristian Danciu