1> create table abc(col1 int not null, text_field text null)
2> go
1> insert abc values(1,null)
2> go
(1 row affected)
1> insert abc values(1,'some text here')
2> go
(1 row affected)
1> select * from abc where text_field is null
2> go
Msg 306, Level 16, State 1:
Server 'SYB_CRIDR1', Line 1:
TEXT and IMAGE datatypes may not be used in a WHERE clause, except with the LIKE expression.
1> select * from abc where text_field not like ''
2> go
col1
text_field -----------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1
some text here (1 row affected)