This is what I wish I could to do.
insert into table_x (a, b, c)
values(1, 2, 3)
where not exist (select * from table_x where a = 2);
Thank you.
additional info:
I've seen conditional inserts without values(....), as in
INSERT INTO clients
(client_id, client_name, client_type)
SELECT supplier_id, supplier_name, 'advertising'
FROM suppliers
WHERE NOT EXISTS (SELECT *
FROM clients
WHERE clients.client_id =
suppliers.supplier_id);


|