i have a table that looks like this
students
----------
ID | Name | Class | Pass
01 | Lisa | 01 | 1D345
02 | Mike | 03 | 22341
03 | Kim | 03 |
04 | Lance | 04 | 193CC
So I wanted to select those where Pass is not empty, and I've tried
SELECT * FROM students WHERE Pass IS NOT NULL;
which returned the same table where it should have fetched me this
students
----------
ID | Name | Class | Pass
01 | Lisa | 01 | 1D345
02 | Mike | 03 | 22341
04 | Lance | 04 | 193CC
I've also tried
SELECT * FROM students WHERE Pass IS NOT '';
and
SELECT * FROM students WHERE Pass !='';
both returning #1064 error, so what is the statement I should be using the fetch the required table?
both returning errorisn't much help, unless you actually include the error message.