在Oracle中,表EMP包含以下列:[br][/br]……[br][/br]NAME VARCHAR2(20)[br][/br]ADDR VARCHAR2(60)[br][/br]……[br][/br]要以NAME’s address is ADDR格式返回数据,以下SQL语句正确的是(
A: SELECT NAME || ’’’s address is ‘ || ADDR FROM EMP;
B: SELECT NAME + ’’’s address is ‘ + ADDR FROM EMP;
C: SELECT NAME + ’\’s address is ‘ + ADDR FROM EMP;
D: SELECT NAME || ’\’s address is ‘ || ADDR FROM EMP;
A: SELECT NAME || ’’’s address is ‘ || ADDR FROM EMP;
B: SELECT NAME + ’’’s address is ‘ + ADDR FROM EMP;
C: SELECT NAME + ’\’s address is ‘ + ADDR FROM EMP;
D: SELECT NAME || ’\’s address is ‘ || ADDR FROM EMP;
举一反三
- 以下语句正确的是() A: select<br/>sal+1 from emp; B: select<br/>sal*10,sal*deptno from emp; C: 不能使用运算符号 D: select<br/>sal*10,deptno*10 from emp;
- 列出所有员工的姓名、部门名称和工资。正确的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
- 列出所有部门的部门名称和部门员工人数。如果部门没有员工,人数显示为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语句“SELECT<br/>* FROM emp WHERE ename LIKE 'A_'”能够查询字母<br/>A<br/>开头的所有雇员信息。()
- 下面删除记录的语句正确的是( ) A: delete from emp where name="Tony"; B: delete * from emp where name="Tony"; C: drop from emp where name="Tony"; D: drop * from emp where name="Tony";