‘11111711E2-1710’
‘11111711E2-1710’
‘11211711E2-1710’
‘11211711E2-1710’
‘11211711E2-1710’
‘11211711E2-1710’
‘11311711E2-1710’
‘11311711E2-1710’
‘11211711E2-1710’
‘11211711E2-1710’
‘11211711E2-1710’
‘11211711E2-1710’
    ‘......'
  这是某一列的值,怎么把第第3位是2都查出来。
用select 能查吗出来吗。

解决方案 »

  1.   

    当然!
    select * from tb where substring(col,3,1)='3'
      

  2.   

     select * from tbName  where SUBSTRING([colName] , 2,1) = '2'; 
      

  3.   


    select * from tb where substring(col,3,1)='2'
      

  4.   

    select * from tb where substring(col,3,1)='3'
      

  5.   

    select * from tb 
    where substring(col,3,1)='2'
      

  6.   

    select * from tb where substring(col,3,1)='2'
      

  7.   

    select * from tb where substring(col,3,1)='3'
      

  8.   

    select * from tb where substring(col,3,1)='2'
      

  9.   

    select * from tb where substring(col,3,1)='2'col啥意思