SQLite 3 · Everyday SQL

Insert or ignore duplicates

Insert a row, doing nothing if the email already exists.

INSERT INTO users (email) VALUES ('[email protected]') ON CONFLICT(email) DO NOTHING;

Official SQLite 3 documentation

More everyday sql commands

All everyday sql commands · SQLite 3 cheatsheet

Was this page helpful?