I have a record:
insert into posts(id, title, body) values(1, 'First post', 'Awesome');
If the First post title and Awesome body already exist in the db, I want to ignore it.
When create a table, it's possible to use IF NOT EXISTS syntax. For inserting, is there an easy way?
INSERT IGNORE. – Alpin Cleopatra Sep 01 '22 at 02:15On CONFLICT(column1, ....)need unique index. It seems it's necessary to create multiple column unique index to do. – Alpin Cleopatra Sep 01 '22 at 02:32