select  *  from 表 where user+email+tel  Like '%abc%'

解决方案 »

  1.   

    select  *  from 表 where user+email+tel  Like '%abc%'楼上有误
    假如 user='xab'  email='cxxx' 
    user+email='xabcxxx'  
    你将把这条记录也select 出来
      

  2.   

    除了user like %% or email like %% 这已是最高效的法子了
      

  3.   

    if object_id('tempdb..#ttt') is not null
    drop table #ttt
    select * into #ttt from 表名 where 1=2
    declare tb cursor local for
    select N'insert into #ttt select * from  '+quotename(o.name)
    +' where '
    +quotename(c.name)+' like N''%abc%'''  
    from sysobjects o,syscolumns c,systypes t
    where o.name='表名' and o.id=c.id 
    and c.xtype=t.xtype
    and objectproperty(o.id,N'IsUserTable')=1
    and t.name like '%char'
    declare @s nvarchar(4000)
    open tb
    fetch tb into @s
    while @@fetch_status=0
    begin
    exec(@s)
    fetch tb into @s
    end
    close tb
    deallocate tb
    select * from #ttt
      

  4.   

    楼上好像用and连接还可以这样哦,用or好像不行~~~~~~
    帮楼主顶~~~~
      

  5.   

    恰恰相反,上面的是or的关系而不是and 的关系