• 2022-10-26
    在学生选课数据库中,查询选修了课程的学生的学号、姓名,SQL语句可为( )
    A: SELECT DISTINCT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno;
    B: SELECT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno;
    C: SELECT DISTINCT Sno, DISTINCT Sname FROM Student WHERE Student.Sno IN (SELECT Sno FROM SC);
    D: SELECT Sno, Sname FROM Student WHERE Student.Sno IN (SELECT DISTINCT Sno FROM SC);
  • 举一反三