Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Insert Or Ignore In SQLite

sql
CREATE TABLE example_table(example_item TEXT UNIQUE);

Then do this :

sql
INSERT OR IGNORE 
INTO example_table(example_item) 
VALUES("alfa bravo");

Note that with this approach an AUTOINCREMENT counter increases even if a row isn't inserted. If that bugs you, you can either not use AUTOINCREMENT (e.g. use the generic ROWID) or use a different approach.

Footnotes And References