i want to set query if row not exist
IF NOT EXISTS (SELECT id FROM table WHERE id=1)
INSERT INTO table (id, name) VALUES (1,'abx');
and that if id!=1 then values are inserted and Check if row already exists
if any solution ?
thanks in advance ...
finally i soved it
INSERT INTO table (id, name) VALUES (1,'abx') ON DUPLICATE KEY UPDATE id = 1;
thanks for your suport