討論串[SQL ] HAVING語法一問
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓3(3推 0噓 3→)留言6則,0人參與, 最新作者jameswiki (烏龜(弄論文中..))時間18年前 (2008/02/03 02:04), 編輯資訊
0
0
0
內容預覽:
你一定要用having嗎?. 在MS-SQL中可以這樣用. select top 1 salary,count(*) as total. from employee. group by salary. order by total desc. --. 發信站: 批踢踢實業坊(ptt.cc). ◆

推噓1(1推 0噓 2→)留言3則,0人參與, 最新作者fantasywater (狂想)時間18年前 (2008/02/03 00:50), 編輯資訊
0
0
0
內容預覽:
語法:select salary,count(*) from employee group by salary;. 結果:. +--------+----------+. | salary | count(*) |. +--------+----------+. | 25000 | 3 |. | 3
(還有156個字)
首頁
上一頁
1
下一頁
尾頁