Вопрос

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

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с dba.stackexchange
scroll top