首页 > 技术文章 > Oracle数据库count的一些操作

of-course 2018-01-26 18:31 原文

 

--统计数量
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;

 

推荐阅读