SQL语句“SELECT
* FROM emp WHERE ename LIKE 'A_'”能够查询字母
A
开头的所有雇员信息。()
* FROM emp WHERE ename LIKE 'A_'”能够查询字母
A
开头的所有雇员信息。()
举一反三
- SQL语句“SELECT<br/>* FROM emp WHERE ename LIKE 'A_'”能够查询字母A开头的所有雇员信息。()
- 查询姓王的学生信息,最准确的SQL语句是(<br/>)。 A: SELECT<br/>* FROM students WHERE s_name='王' B: SELECT<br/>* FROM students WHERE s_name='王%' C: SELECT<br/>* FROM students WHERE s_name LIKE '王' D: SELECT<br/>* FROM students WHERE s_name LIKE '王%'
- 要找出所有名字第二个字母为“a”的导演的电影信息,SQL语句为 A: SELECT * FROM Movie WHERE director LIKE ‘_a_’; B: SELECT * FROM Movie WHERE director LIKE ‘%a%’; C: SELECT * FROM Movie WHERE director LIKE ‘%a_’; D: SELECT * FROM Movie WHERE director LIKE ‘_a%’;
- 列出所有部门的部门名称和部门员工人数。如果部门没有员工,人数显示为0。正确的查询语句有_________。 A: SELECT dname,COUNT(ename) AS ecount <br>FROM dept,emp <br>WHERE emp.deptno(+)=dept.deptno <br>GROUP BY dept.dname B: SELECT dname,(SELECT COUNT(*) AS ecount FROM emp WHERE emp.deptno=dept.deptno) <br>FROM dept C: SELECT dname,COUNT(ename) AS ecount <br>FROM dept LEFT JOIN emp ON emp.deptno=dept.deptno <br>GROUP BY dept.dname D: SELECT dname,COUNT(*) AS ecount <br>FROM dept LEFT JOIN emp ON emp.deptno=dept.deptno <br>GROUP BY dept.dname
- 列出所有员工的姓名、部门名称和工资。正确的SQL语句有________。 A: SELECT a.ename <br> ,(SELECT b.dname FROM dept b) AS dname <br> ,sal <br>FROM emp a B: SELECT a.ename <br> ,(SELECT b.dname FROM dept b WHERE b.deptno=a.deptno) AS dname <br> ,sal <br>FROM emp a; C: SELECT a.ename,b.dname,sal <br>FROM emp a,dept D: SELECT a.ename,b.dname,sal <br>FROM emp a,dept b <br>WHERE a.deptno=b.deptno