help me please to understand, how to remake this query using joins.
INSERT INTO mytable
(user_id, tag)
SELECT ?, ?
WHERE NOT EXISTS (SELECT user_id FROM mytable WHERE user_id=? AND tag=?)
I saw similar questions that use two different tables, but here i have one table.
I need to insert only if the same entry does not exist. mytable
table does not have any UNIQUE constraints and i can't change scheme.