select * from tableName  where left(物资编码,4)="0202" 
and len(物资编码)>4

解决方案 »

  1.   

    select * from tableName  where 物资编码 like "0202%" 
    and 物资编码<>'0202'
      

  2.   

    .. where 物资编码 LIKE "0202%"
      

  3.   

    .. where 物资编码 LIKE "0202%"
      

  4.   

    Select * From TableName Where 物资编码 Like "0202%"
      

  5.   

    select * from tableName  where len(物资编码)>4 and left(物资编码,4)="0202"
      

  6.   

    可以试一试substring函数,
    不知道你的数据库是什么?