in sqlite3 using the command line, if I want to enter something very approximate and get the correct output I use
select * from <table_name> where <col_name> like '%<query>%';
where is the name of my table, is the column name and is the partial query name for example
SELECT * FROM suppliers WHERE supplier_name like '%bob%';
as suggested here
I’m using sqlite3 with C, and I don’t know how to insert the “%” symbols at the starting and ending. Can someone suggest a very easy method to do this, probably with the use of sqlite3_mprintf for creating the sql statement?
1 Answer