
1,select s,sname from S where age<22 and sex='女'
2,select count(*) from SC
3,select sname,age where sex='男' and age>(select max(age) from S where sex='女')
4,insert into S values('S9','WU',18)
5,delete from SC where grade is null
6,update SC set grade=grade*1.05 where c='C4' and grade<=75
update SC set grade=grade*1.04 where c='C4' and grade>75
7,select sname from S where sex='女' and sno in(
select sno from SC where c in(
select c from C where teacher='LIU老师'))
8,select c,cname from C where c in(
select c from SC SC1 where exists(
select * from SC SC2 where SC2.c=SC1.c and SC2.s in(
select S.s from S)))
9,select s,sname from S where sex='男' and age>23
10,select s from S where exists(
select * from SC where SC.s=S.s and c in(
select c from C where teacher='LIU老师'))
11,select SC1.s
from (select SC.s,count(*) countnum from SC group by SC.s) SC1
where SC1.countnum>=2
12,select c,avg(grade) from SC
where c in(select C.c from C where teacher='LIU老师')
group by SC.c
13,select sname,age from S where sname like 'WANG%'
14,insert into STUDENT
select S.s,S.sname,S.sex from S where not exists(
select * from SC where S.s=SC.s and grade<80)
15,select s,c from SC where grade is null
16,select S1.sname,S1.age from S S1 where S1.sex='男' and S1.age>(
select avg(age) from S S2 where S2.sex='女')
跑到网上来让别人做题的了,那么简单的问题都不自己写,
你会后悔的。
在学数据库吧,听过来人一句劝,这是基础学科,想搞编程的话就好好学他,别到工作了要用重新看书,那叫个悲催
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)