SELECT SQL語法總整理
SELECT的基本語法如下~ 依照給予的條件,抓出資料。 SELECT * | {[DISTINCT, DISTINCTROW] field_list} FROM table_list WHERE conditions GROUP BY {field_list} [ASC,DESC] HAVING conditions ORDER BY {field_list} [ASC,DESC] 假設有以下表單 student( studno , studname, deptid) 學生資料表 course( yearsemester, courseid, studno , score) 選課單 coursemain( courseid , coursename, coursecredit, courseflag, deptid) 課程基本資料表 teacher( teano , teaname, deptid) 教師資料表 courseopen( yearsemester, courseid , teano, coursetime, room) 教師開課表 dept( deptid , deptname) 科系資料表 1. SELECT * F…