id | a | b |
-----------------------------
1 | xyz | abc |
This is the structure of my table.The column id is AUTO_INCREMENT.
I want to insert only those data in the table whose 'b' is not abc.
For example-
This should not insert anything:
insert into table_name(`a`,`b`) values("xyz","abc");
However this should insert new record:
That is it should only check column b.
insert into table_name(`a`,`b`) values("xyz","zzzz");
How do i do this?