![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
关于sql语句
程序员小天仙
越努力,越幸运。
展开
-
mysql中count函数的使用方法之特殊用法
这两天写项目遇到了一个问题 SELECT device_type, COUNT(*) AS deviceCount, COUNT(use_end_time<NOW())AS endCOunt FROM t_cfg_device WHERE device_use_state = 1 GROUP BY device_type 我想求在一个sel...原创 2019-08-14 17:54:08 · 432 阅读 · 0 评论 -
sql的left join 中的on 和where的区别
刚开始做项目对于left join的细节还不太注意, SELECT g.dict_note AS device_type, a.deviceCount AS device_count, a.endCount AS end_count, a.description AS description FROM ...原创 2019-08-14 20:41:30 · 214 阅读 · 0 评论