I have trawled through tens of forums now to find MySql syntax to insert a row if there is no other row in the table that contains a give value.
I know it has to be simple but so far have found nothing that does what I need...
My requirement is simply:
if not exists (select * from table1 where int_value2 = 123) then
insert into table1 (value1, int_value2, value3)
values ('a', 1, 'a');
I apologise for how simple I know this is going to be but thanks in advance for any help you can offer.