mysql - NULL values in where condition is not working -


i have encountered weird problem in mysql query. following query returning me 0 result whereas there many rows should returned. query is

select distinct sku, ean, url, cid    tab_comp_data   status ='' 

and in many rows there null values in status column returns me no rows.

i have tried other way round.

select distinct sku, ean, url, cid    tab_comp_data   status <>'inact' 

this returns me no rows.

p.s. status column can null or 'inact'

i want query null values, should use is null operator.

so, query should like:

select distinct sku, ean, url, cid    tab_comp_data  status null 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -