How do I check if a SQL Server text column is empty?
where datalength(mytextfield)=0
where datalength(mytextfield)=0
You should use IS NOT NULL. (The comparison operators = and <> both give UNKNOWN with NULL on either side of the expression.) SELECT * FROM table WHERE YourColumn IS NOT NULL; Just for completeness I’ll mention that in MySQL you can also negate the null safe equality operator but this is not standard SQL. … Read more