groupby分组oraclegroupby与分组列为null空SQL> create table t_group(a int,b int);
Table created
SQL> insert into t_group values(null,1);
1 row inserted
SQL> insert into t_group values(null,2);
1 row inserted
SQL> insert into t_group values(1,2);
1 row inserted
SQL> insert into t_group values(3,2);
1 row inserted
SQL> commit;
Commit complete
SQL> select * from t_group;
A B
--------------------------------------- ---------------------------------------
1
2
1 2
3 2
SQL> select a,count(b) from t_group group by a;
A COUNT(B)
--------------------------------------- ----------
2
1 1
3 1
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论