I want to select those rows whose value is not null. In other words, there is this company whose shares is traded today so the stock value is not null today; but maybe tommorrow, the shares of that company is not traded but the company's name is in the database which i don't want to show when the value is null. Please help
SELECT * FROM table WHERE name='bla' AND stock_value IS NOT NULL
it did not work
and the error was...?
It did not pop up any errors. It showed the record with the value '0'.
Ah, so you are not looking for NULL at all, you are looking for zero. SELECT * FROM table WHERE col1>0
or SELECT * FROM table WHERE col1<>0