tt's suggestion should work. I did it on Firebird, that was very similar to the code on the reply #2.
It might work, it might not.
The important question is, WHY does he wants to check if a record exists?
Because i have a suspicion, that it's not even necessary to query the Database if a record exists, if the table/columns are set up correctly.
Because this is a "classic" question from Database-Beginners:
Check if record exists.
If no, insert the new record
If yes, warn user "Ehh...No...Already Exists" (optionally offer to update existing record instead of inserting a new one).
With correctly set up tables/columns, it's not necessary to query beforehand, since SQLite supports all necessary mechanisms out-of-the-box