I have a table in a MySQL bd that has 5 fields. This would be a template query:
select * from myTable where campo1= 4 and campo2=1 and campo3 =7.
However, field3 may have null value and I would need to select or exclude combinations that involve this value.
Example 1:
select * from myTable where campo1= 4 and campo2=1 and campo3 = null.
Example2:
select * from myTable where campo1= 4 and campo2=1 and campo3 <> null.
The problem is that these two examples do not work.
I've already tried using "null"
and 'null'
but I can not select.
Any ideas?