Alex Rivera | Logout

How do I check if a SQL Server text column is empty?

Asked 2008-08-28T21:09:00.143
218

I am using SQL Server 2005. I have a table with a text column and I have many rows in the table where the value of this column is not null, but it is empty. Trying to compare against '' yields this response:

The data types text and varchar are incompatible in the not equal to operator.

Is there a special function to determine whether the value of a text column is not null but empty?

Edit
Report

1 Answer

2

Use the IS NULL operator:

Select * from tb_Employee where ename is null
answered 2013-06-04T10:49:48.383

Your Answer