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

前端 未结 16 1136
粉色の甜心
粉色の甜心 2020-12-07 11:07

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 comp

16条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-07 11:42

    try this:

    select * from mytable where convert(varchar, mycolumn) = ''
    

    i hope help u!

提交回复
热议问题