數學運算元:+、-、*、/、( )、=、>、<、<>、>=、<=
範例一:列出所有欄位,符合國文科目小於60分的資料
指令:select * from exam where cht<60;

範例二:列出編號和姓名欄位,符合國文科目小於60分的資料
指令:select no,name from exam where cht<60;

範例三:列出姓名欄位和平均別名,符合三科目平均60分以上的資料
指令:
select name,(cht+eng+math)/3 as average from exam
where (cht+eng+math)/3>60;
|
|