--查询其他系中比计算机系年龄小的学生信息
select *,YEAR(GETDATE())-YEAR(Sage) as Sage
from S
where college<>'计算机系'
and Sage>some
(select Sage
from S
where college like '计算机系'
)
select Sno,Grade
from SC
where Cno='c001'and Grade>
(select avg(Grade)
from SC
where Cno like'c001'
)
sql查询连接
最新推荐文章于 2024-09-07 22:37:02 发布