문제

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