A SELECT query is executed like any other statement.
To read the returned data, call sqlite3_step() in a loop. It returns:
SQLITE_ROW: if the data for the next row is available, or
SQLITE_DONE: if there are no more rows, or
any error code.
If a query does not return any rows, the very first...