Reputation: 10542
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%';
Upvotes: 1
Views: 8358
Reputation: 18290
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';
Upvotes: 10