• 2022-06-16
    S_T数据库关系图如下:[img=332x128]17e448fc85e997f.jpg[/img]查询与“刘晨”在同一个系学习的学生,要求显示学生学号(Sno)、姓名(Sname)及系别(Sdept)。下列SQL语句正确的是()。
    A: SELECT Sno, Sname, Sdept FROM Student WHERE Sdept = (SELECT Sdept FROM Student WHERE Sname = '刘晨');
    B: SELECT S1.Sno, S1.Sname , S1.Sdept FROM Student S1 , Student S2 WHERE S1.Sdept = S2.Sdept AND S2.Sname = '刘晨';
    C: SELECT Sno, Sname, Sdept FROM Student WHERE Sdept IN (SELECT Sdept FROM Student WHERE Sname = '刘晨');
    D: SELECT Sno, Sname, Sdept FROM Student WHERE Sdept LIKE (SELECT Sdept FROM Student WHERE Sname = '刘晨');
  • 举一反三