一條SQL語句實現查詢成績-60、60~80、+80的人數的方法

總結一下學到的一個SQL方法。下面我創建一個數據表: SELECT * FROM students; 可以看到數據表中存在六條數據,如果使用傳統的查詢方法,我們需要三條SQL語句,分別是: select count(*) from students where score<60; select count(*) from students where score>80; select count(
相關文章
相關標籤/搜索