以oracle 为例:
1、create table student( Sno number(10) primary key,
Sname varchar2(20),
Ssex varchar2(2),
Sage number(10),
Sdept varchar2(20)
);
2、SELECT * FROM student FROM Sdept='计算机' ORDER BY Sno DESC
3、SELECT DISTINCT student.Sno,student.Sname,student.Ssex
FROM student,Course,SC
where student.Sno=SC.Sno AND Course.Cno=SC.Cno
AND Course.Ccredit=5 AND SC.Grade > 60
4、create or replace trigger my_trig
after delete on student
for each row
begin
delete from SC where Sno=:student.Sno;
end;