有谁能写下sql server2012语句?谢谢

2025-06-25 13:07:00
推荐回答(2个)
回答1:

select Sno,Sname,Ssex from Student a(nolock) where a.Sno not in (select y.Sno from (select * from Student where Sdept>=80) x right join SC y on x.Sno=y.Sno where x.Sno is null)

回答2:

Insert into S(SNO,SNAME,SEX)
Select Sno,sname,ssex
From student t1
Where not exists(select *
From sc t2
Where t1.sno=t2.sno and grade>=80)