How to select distinct rows without using group by statement

前端 未结 4 622
挽巷
挽巷 2021-01-01 19:28
A B C
1 1 1 
1 1 1 
2 2 2 
2 2 2 
3 3 3 
3 3 3 
4 4 4 
4 4 4 
5 5 5 
5 5 5 
5 5 5 
6 6 6
6 6 6 

I am to output only the distinct rows without using

4条回答
  •  抹茶落季
    2021-01-01 19:55

    the DISTINCT keyword does what you want. I.e., if the name of your table is A, select distinct * from A will do the trick.

    Cf. mysql manual: http://dev.mysql.com/doc/refman/5.0/en/select.html

提交回复
热议问题