Oracle数据库count的一些操作

 

--统计数量
select count(*) from table;
--统计某一列的数量(去空)
select count(col) from table;
--统计某一列的值大于或小于另一个值的数量(去不去空没试过)
select count(CASE when t.column_name>0 then 'name' end) as new_name from table;

 

posted @ 2018-01-26 18:31  天涯已可  阅读(1622)  评论(0编辑  收藏  举报