题目呢?没有题怎么回答。
补充回答
update course set 学分 =3 where 课程号=3
select * from student where 年龄>18 order by 学号 desc
select s.学号,s.姓名,s.性别 from student s
inner join sc on sc.学号= s.学号
inner join course c on sc.课程号 on c.课程号
where c.学分=3 and sc.成绩>30
group by s.学号,s.姓名,s.性别
这个查询会比用in查询快一些。
create trigger my_trig on student for delete
as
begin
delete from sc where 学号 in(select 学号 from deleted)
end;
1.update sc set 成绩=3 where 课程号=3
2.select * from student where 年龄>18 order by 学号
3.select 学号,姓名,性别 from student,course,sc where student.学号=sc.学号 and course.课程号=sc.课程号 and 学分=3 and 成绩>80
4.create trigger my_trig
on student for delete
as
begin
delete from sc where 学号 in(select 学号 from deleted)
end;
1. update course set 学分=3 where 课程号=3
2. select * from student where 年龄>18 order by 学号 desc
3. select 学号、姓名,性别 from student join sc on student.学号=sc.学号 where 成绩>80 and 课程号 in (select 课程号 from course where 学分=3)
4. create trigger my_trig
on student for delete
as
begin
delete from sc where 学号 in(select 学号 from deleted)
end;
一年前我会,现在忘啦