热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_43919932
我叫RT
5 年前
trueweixin_43919932

sql笔记

where与having。
1.前者在分组前对查询结果进行过滤。后者在分组后对查询结果进行过滤。
2.前者不可以使用聚合函数。SUM,MAX这些函数都要在having后面使用。
3.后者不能单独使用,需要结合group by一起使用。如果我们的sql语句没有加上group by 就使用having。那么系统会默认改写为group by null。

提炼:
having字句要写在group by语句之后, 条件可以是聚合函数也可以是普通字段条件。

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
透析SPI底层原理Commands and data are sent to the device via the SI pin, with data being clocked in on the rising edge of SCK. Data is driven out by the MCP2515 (on the SO line) on the falling edge of SCK.命令和数据通过SI脚发到设备上,数据在SCK的上升沿写入。数据在SCK的下降沿从SO脚输出。
立即登录