Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: SQL
Expertise: Beginner
Jan 4, 2010

Use Comparison Operators in SQL to Remove/Return Columns with Null Values

When you use the comparison operators in SQL with the Where clause, you can remove the columns with null values. If you need the values with null too, then you need to use the appropriate ISNull function as follows:
where IsNull(columnname, value) not like 'comparisonValue'
Replace columnname with the correct column name and value with something like 'comparisonValue' & 'extraText'.

The extraText is just to ensure that you don't end up fetching a record that exactly matches the replacement value.

Srinath MS
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.