SQL 2023 · Changing data
Insert or update (PostgreSQL and SQLite)
Insert a row, or update it if the key already exists.
INSERT INTO users (email, name) VALUES ('[email protected]', 'Ada')
ON CONFLICT (email) DO UPDATE SET name = EXCLUDED.name;
Official SQL 2023 documentation