本题目要求编写SQL语句,
检索Student
表中与‘张三’在同一个专业的学生记录。
提示:MSSQLServer 评测SQL语句。
select stu.sno as 学号,stu.sname as 姓名
from stu
where mno
in (
select mno
from stu
where sname=N'张三'
)
and sname != N'张三';
/*llll*/
本题目要求编写SQL语句,
检索Student
表中与‘张三’在同一个专业的学生记录。
提示:MSSQLServer 评测SQL语句。
select stu.sno as 学号,stu.sname as 姓名
from stu
where mno
in (
select mno
from stu
where sname=N'张三'
)
and sname != N'张三';
/*llll*/