select * from tb where colName like '%AB%'

解决方案 »

  1.   

    select * from tablename where charindex('AB',字段1)>0
    select * from tablename where 字段1 like '%AB%'
    select * from tablename where patindex('%AB%',字段1)>0
      

  2.   


    SELECT editunit_id FROM DB2ADMIN.T_BASIC_FAMINFO where SUBSTR(editunit_id,1,1)='a'
    这个是我的正确答案
      

  3.   

    这个是在DB2中的 SQL中的可以这样写
    SELECT editunit_id FROM T_BASIC_FAMINFO where substring(editunit_id,0,1)='a'
    SELECT editunit_id FROM DB2ADMIN.T_BASIC_FAMINFO where editunit_id.substring(0,1)='a'