當前位置:編程學習大全網 - 網站源碼 - oracle 查詢兩個count(*)

oracle 查詢兩個count(*)

select count(1) from student where 歲數 = '18'

union all

select count(1) from student where 歲數 = '19'

這樣得到的是兩條數據各是壹個字段

select a.c_1,b.c_2 from

(select count(1) as c_1 from student where 歲數 = '18') a,

(select count(1) as c_2 from student where 歲數 = '19') b

這樣得到的是壹條數據兩個字段

  • 上一篇:學哪種語言,可以高性價比的滿足壹般生活需求?
  • 下一篇:發現淘寶有人賣我們軟件的盜版後如何舉證?如何處罰?
  • copyright 2024編程學習大全網