table表 
    
   ID        name         TEL
   1         张三         13367890000,13455550000
  我在前台输入查询条件, 我要做到精确查询  
  
 select * from table where tel='13367890000' 我怎么做到根据条件来去TEL字段里面的中的一个值

解决方案 »

  1.   

     select * from table where tel like '%13367890000%'
      

  2.   


         不用LIKE  可以做这个字段的截取吗?
      

  3.   

    select * from table where charindex(','+'13367890000'+',',ltrim(tel)>0
      

  4.   


    select * from [tb] 
    where CHARINDEX(',13367890000,',','+ltrim(TEL)+',')>0
      

  5.   

    select * from table where charindex(','+'13367890000'+',',','+ltrim(tel)+',')>0
      

  6.   

    where charindex(','+@a+',',','+[TEL]+',')>0