SELECT cName , cPhone FROM students WHERE cID BETWEEN 2 AND 4;
SELECT * FROM students WHERE cSex = 'M';
SELECT * FROM students WHERE cID IN (1, 3, 5, 7, 9);
SELECT * FROM students WHERE cNAME LIKE '林%';
SELECT * FROM students WHERE CID BETWEEN 2 AND 4 ORDER BY cBirthday DESC;(以生日遞增排序篩選出座號2到4間)
SELECT CID AS '座號 ' , CNAME AS '姓名' , CHEIGHT AS '身高' , CWEIGHT AS '體重' , (CHEIGHT-70)*0.6 AS '標準體重' FROM students;
SELECT AVG(score) FROM scorelist WHERE course = '國文';
SELECT MAX(score) FROM scorelist WHERE course = '國文';
SELECT cid , sum(score) FROM scorelist GROUP by cid;(分組排列共同都有cid)
SELECT cid , sum(score) FROM scorelist GROUP by cid HAVING CID <=5(分組排列HAVING為條件放在GROUP後面,不能用WHERE )
~歡迎轉載,但請註明來源網站名稱和網址,文章若有侵權,請來信告知,我們會盡快處理~
SELECT * FROM students WHERE cSex = 'M';
SELECT * FROM students WHERE cID IN (1, 3, 5, 7, 9);
SELECT * FROM students WHERE cNAME LIKE '林%';
SELECT * FROM students WHERE CID BETWEEN 2 AND 4 ORDER BY cBirthday DESC;(以生日遞增排序篩選出座號2到4間)
SELECT CID AS '座號 ' , CNAME AS '姓名' , CHEIGHT AS '身高' , CWEIGHT AS '體重' , (CHEIGHT-70)*0.6 AS '標準體重' FROM students;
SELECT AVG(score) FROM scorelist WHERE course = '國文';
SELECT MAX(score) FROM scorelist WHERE course = '國文';
SELECT cid , sum(score) FROM scorelist GROUP by cid;(分組排列共同都有cid)
SELECT cid , sum(score) FROM scorelist GROUP by cid HAVING CID <=5(分組排列HAVING為條件放在GROUP後面,不能用WHERE )
~歡迎轉載,但請註明來源網站名稱和網址,文章若有侵權,請來信告知,我們會盡快處理~
響應式網頁架站只要6,888元起|[RWD]響應式網站,自適應網頁,讓SEO搜尋引擎最佳化你的網站
"你是獵人還是獵物?"
0 comments :
張貼留言
1.猛甲茶道,歡迎多留言,可以幫自己網站打廣告~
2.需要 猛甲茶道 回覆,請勿使用匿名留言[可使用名稱/網址,名稱填自己名字,若無網址,請填E-mail]。
3.匿名攻訐、不相干之廣告適用於無條件刪去法,望請海涵:)
4.您可以使用一些 HTML 標記,如:
<b>粗體</b>, <i>斜體</i>, <a href='網址'>描述文字</a>