How to insert multiple rows or values and avoid duplicates in the following diagram.
table layout
id,subject1,subject2,subject3
id is automatically incremented.
A duplicate will be where all subject1, subject2, subject3 already exist in the record in the same order.
INSERT INTO "table_name" ("subject1","subject2","subject3")
VALUES ("cats", "dogs", "hamsters")
VALUES ("squirrels", "badgers", "minxes")
VALUES ("moose", "deer", "ocelots")
In the table, you can say that I already have an entry for
id,subject1,subject2,subject3
1,"cats", "dogs", "hamsters"
so I want it to just insert
VALUES ("squirrels", "badgers", "minxes")
VALUES ("moose", "deer", "ocelots")
I saw answers about excluding duplicates for individual elements, but not for 3.