数据库中写sql语句

2025-03-26 13:15:48
推荐回答(1个)
回答1:

1
select 姓名 from s where 学号 in
(select a.学号 from
(select 学号 from sc where 课程号=1) a,
(select 学号 from sc where 课程号=2) b
where a.学号=b.学号)

2
select s.*,c.*,sc.成绩 from s,c,sc where s.学号=sc.学号 and c.课程号=sc.课程号

3
select distinct 学号 from sc where 成绩<60 


4
select 系名  from s where 性别='女'  group by 系名 having count(*)>80

5
update s set 年龄=22 where 学号='2012511'