1

How can i write a mySQL query where i am looking for something using the LIKE operator and NOT equaling what is LIKE?

select * from ets_fi where name like '%barcode&' <> '%barcode%';
4

1 に答える 1

10

NOT LIKE

select * from ets_fi where name NOT LIKE '%barcode%';

OR, if I misunderstood your intention, you may want:

select * from ets_fi where name LIKE '%barcode%' AND name != 'barcode';
于 2012-08-01T16:28:12.713 に答える