SQL grouping by all the columns

后端 未结 9 1534
囚心锁ツ
囚心锁ツ 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条回答
  •  Happy的楠姐
    2020-12-29 02:42

    Short answer: no. GROUP BY clauses intrinsically require order to the way they arrange your results. A different order of field groupings would lead to different results.

    Specifying a wildcard would leave the statement open to interpretation and unpredictable behaviour.

提交回复
热议问题