解决方案 »

  1.   


    create table testText
    (
     textCol text,
     textCol2 text)
    insert into testText(textCol,textCol2) 
    values ('searchThis','searchThis1')
    select *
    from testText
    where SUBSTRING(textCol,1,datalength(textCol)) <> SUBSTRING(textCol2,1,datalength(textCol2))/*
    textCol textCol2
    searchThis searchThis1*/
      

  2.   


    用 substring 就行 ,注意截取长度使用的是datalength
      

  3.   

    也可以用 CAST([TEXT字段]AS VARCHAR(MAX)),然后再比较
      

  4.   

    常见做法是增加一个字段,保存text的时候同时对text做hash,将hash值保存在这个新字段中
    比较的时候直接比较hash字段
      

  5.   

    常见做法是增加一个字段,保存text的时候同时对text做hash,将hash值保存在这个新字段中
    比较的时候直接比较hash字段