SQL grouping by all the columns

后端 未结 9 1548
囚心锁ツ
囚心锁ツ 2020-12-29 02:04

Is there any way to group by all the columns of a table without specifying the column names? Like:

select * from table group by *
9条回答
  •  误落风尘
    2020-12-29 02:45

    No because this fundamentally means that you will not be grouping anything. If you group by all columns (and have a properly defined table w/ a unique index) then SELECT * FROM table is essentially the same thing as SELECT * FROM table GROUP BY *.

提交回复
热议问题