阅读背景:

为什么我需要在SQL“GROUP BY”子句中明确指定所有列 - 为什么不“GROUP BY *”?

来源:互联网 

This has always bothered me - why does the GROUP BY clause in a SQL statement require that I include all non-aggregate columns? These columns should be included by default - a kind of "GROUP BY *" - since I can't even run the query unless they're all included. Every column has to either be an aggregate or be specified in the "GROUP BY", but it seems like anything not aggregated should be automatically grouped.This has always bothered me - why does the GROU




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: