How can I make an insert with a where condition?
I have the following query:
INSERT INTO 'registro'('id', 'username')
values
('','USER_1'),
('','USER_2'),
('','USER_3')
It will add a new user to the table record. Except that I need it to verify that this user already exists in the DB, if it already exists it should not insert. This check should only be done for the username
column.
I have read in some places that the INSERT does not accept the WHERE, in this case how should it be done?