select * from table1 where left(id,3)="011" and val(substr(3,length(id))=0

解决方案 »

  1.   

    select str1 from table1 where 
     left(str1,3) = '011'
     and right(str1, len(str1) - 3) = replicate('0',len(str1) - 3)
      

  2.   

    select * from 表 where 列 like '011%' and cast(substring(列,4,100) as int)=0
      

  3.   

    ricetons,pengdali可能理解错了,00....只是一个例子,如果是111....,aaaa...呢?欢迎继续讨论,谢谢~
      

  4.   

    select * from 表 where 列 = '011'+REPLICATE ('0',len(列)-3)
      

  5.   

    哦!那就这样呀!
    select * from 表 where 列 like '011%' and replace(substring(列,4,len(列)),substring(列,4,1),'')=''
      

  6.   

    http://expert.csdn.net/Expert/TopicView1.asp?id=1413951
    http://expert.csdn.net/Expert/TopicView1.asp?id=1413967
    http://expert.csdn.net/Expert/TopicView1.asp?id=1413969这三个帖子是同样的问题,希望tj_dns,abcddcba,pengdali去领分