Aug 8, 2012

Select Records having NULL or Empty value

It is easy to query if the default value of the field is NULL, while in certain case when the field is empty. In such case execute the query like below.

SELECT * FROM tblUser
WHERE (LastName IS NULL) OR (RTRIM(LastName ) = '')

Happy SQLing

No comments:

Post a Comment