select * Articles where Content != ''
此句中Content类型为text,执行报错,说是在运算符中不兼容,如果是varchar没有问题
而select * Articles where Content not like ''可以,

解决方案 »

  1.   

    select * Articles where convert(varchar(max),Content) != ''试试上面那个,尽量不要用text类型,问题很多
      

  2.   

    我的问题也就是这个,当他的类型为text时候,为什么不能 用 != ''这中方式??
      

  3.   

    具体不清楚,但是text有很多限制。比如不能搞索引
      

  4.   

    当类型为text时,不能用比较运算符,因为text类型的数据存储方式是不一样的。text类型的字段中并没有直接存储字符数据而是存储了一个长十六位的指针,这个指针指向字符数据实际存储的数据页。
      

  5.   

    select * Articles where Content is not null
      

  6.   

    select * from Articles 你少了from