测试了 where col=* 行不通的当然。不写where 默然就是查询所有求where 出匹配全部列的方法

解决方案 »

  1.   

    匹配所有还要WHERE干什么呀,有点不太明白。
      

  2.   

    where 1=1
    where 'a'='a'
    where '张三'='张三'
    ..........
    select * from tb 
    不要where 也行
      

  3.   


    declare @a table(id int ,name varchar(20))
    insert @a select
    1,'da' union all select
    2,'dda' union all select
    3,'gga' union all select
    4,'djja' select * from @a where name like '%%'
    /*
    id          name
    ----------- --------------------
    1           da
    2           dda
    3           gga
    4           djja(4 行受影响)
    */select * from @a where id like '%%'
    id          name
    ----------- --------------------
    1           da
    2           dda
    3           gga
    4           djja(4 行受影响)
      

  4.   

    select * from tb where col1...,col2...,col3...
      

  5.   

    不懂为什么查询所有还要用 WHERE 
      

  6.   

    不用可以为什么还要加WHERE
    LZ,你想实现什么功能说清楚点