I’ve got a simple DB query. Basically I want to select all rows that are NOT equal to a certain set of strings, or is empty (if it’s empty I do NOT want it to be selected).
This is what I’ve got:
select * from tbl_user where secretCode != ('S00' OR 'S05' OR 'A10' OR '')
The datatype of secretcode is CHAR(4), NULL (NO), DEFAULT NONE
What am I doing wrong here, should I be using NULL instead of '' ?
Thanks.
I think your query should be like this: