'What is the most effective way to exclude blank records in a SQL Server query

I am trying to run a query to return all rows that are not null. But, I am not able to get that done.

How is this possible? Please assist.

enter image description here



Solution 1:[1]

where ISNULL(EmailAddress,'') <> ''

Solution 2:[2]

You can use:

where emailaddress is not null

Or, frankly, just about any other comparison filters out NULL values as well:

where emailaddress <> ''

Filters out zero-length strings and NULL values.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 prem
Solution 2 marc_s