select col1,col2,col3 from table1 where col2=6 or col2=7

解决方案 »

  1.   

    select * from tablename where  col2 in
     (select col2 from tablename group by col2 having count(*)>1 )
      

  2.   

    select * from table where col2 in (select col2 from table where count(*)>1 group by col2) order by col2
      

  3.   

    应该是有重复行的吧!
    select * from tablename where  col2 in
     (select col2 from tablename group by col2 having count(*)>1 )
      

  4.   

    select * from table1 where col2=6 or col2=7
      

  5.   

    select * from Table1 
    where col2 in(select col2 from table1 group by col2 having count(col2)>1) 
    order by col2
      

  6.   

    select col1,sol2,col3 from  table where col2>5  order by col2