我的SQL语句为
select * from t_newgoods where itemtype like '%substr('TFT32L98SW',1,3)%'取型号'TFT32L98SW'的昨天前三位字母 作模糊查询 这个SQL不对 应该怎么写啊!

解决方案 »

  1.   

    select * from t_newgoods where itemtype  LIKE '%'||substr('TFT32L98SW',1,3)||'%'
      

  2.   

    TFT32L98SW是什么?字段名还是
    字段名
    select * from t_newgoods where itemtype  LIKE '%'||substr(TFT32L98SW,1,3)||'%'
    固定值
    select * from t_newgoods where itemtype  LIKE '%TFT%'
      

  3.   

    lz应该是select * from t_newgoods where itemtype  LIKE '%TFT%'
      

  4.   

    select * from t_newgoods where itemtype  LIKE '%TFT%'应该是固定值!