• 2022-11-04
    列出所有员工的姓名、部门名称和工资。正确的SQL语句有________。
    A: SELECT a.ename
    ,(SELECT b.dname FROM dept b) AS dname
    ,sal
    FROM emp a
    B: SELECT a.ename
    ,(SELECT b.dname FROM dept b WHERE b.deptno=a.deptno) AS dname
    ,sal
    FROM emp a;
    C: SELECT a.ename,b.dname,sal
    FROM emp a,dept
    D: SELECT a.ename,b.dname,sal
    FROM emp a,dept b
    WHERE a.deptno=b.deptno
  • 举一反三