Pergunta

select *  from "StudentMaster" where "PhoneNo" = NULL;

Syntax error!

i want to see all record which don't Have Phone number !

I have try this all thing.

select *  from "StudentMaster" where "PhoneNo" NOT LIKE ('%');

select *  from "StudentMaster" where "PhoneNo" NOT IN ('%');

But it show all record which have Phone Numbers but NOT NULL! Why

Foi útil?

Solução

Adding my comment as an answer since it solved the problem:

Try IS NULL instead of = NULL -- I forget that myself sometimes!

I think someone that knows about mathematics would say the NULL is nothing so an equals comparison does not work as expected.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a dba.stackexchange
scroll top