对于以下SQL语句说法正确的是() SELECT ename FROM emp WHERE sal IN (SELECT MAX(sal) FROM emp GROUP BY deptno);A、这个语句是符合语法的B、这个语句是不能执行的,因为缺少HAVING子句C、这个语句是不能执行的,因为分组的条件列不在SELECT列表中D、这个语句是不能执行的,因为GROUP BY子句应该在主查询中,而不是在子查询中E、在主查询的WHERE条件中,不应该用IN,而应该用等号
对于以下SQL语句说法正确的是() SELECT ename FROM emp WHERE sal IN (SELECT MAX(sal) FROM emp GROUP BY deptno);
- A、这个语句是符合语法的
- B、这个语句是不能执行的,因为缺少HAVING子句
- C、这个语句是不能执行的,因为分组的条件列不在SELECT列表中
- D、这个语句是不能执行的,因为GROUP BY子句应该在主查询中,而不是在子查询中
- E、在主查询的WHERE条件中,不应该用IN,而应该用等号
相关考题:
当你执行以下查询语句:SELECT employeesno,ename FROM employees WHERE employeesno=7782 OR employeesno=7876;在WHERE语句中,以下哪个操作符可以取代OR?() A.INB.BETWEEN……andC.LIKED.=
下列哪个语句查出雇员表(employees)里的雇员名字(ename)是‘SMITH’的信息,并且给雇员名字(ename)列定义一个别名Name()。 A.select employeesno,ename Name,job from employees where ename=‘SMITH’B.select employeesno,ename ‘Name’,job from employees where ename=SMITHC.select employeesno,ename “Name”,job from employees where ename=‘SMITH’D.select employeesno,ename ‘Name’,job frome mployees wheree name=‘SMITH’
以下语句不正确的是( )A.select * from emp;B.select ename,hiredate,sal from emp;C.select * from emp order deptno;D.select * from where deptno=1 and sal
Examine the following commands and their output:SQL SELECT ename, sal FROM emp WHERE ename=‘JAMES‘; ENAME SAL JAMES 1050QL UPDATE emp SET sal=sal+sal*1.2 WHERE ename=‘JAMES‘;1 row updated.SQL SELECT ename, sal FROM emp WHERE ename=‘JAMES‘; ENAME SAL JAMES 2310View the exhibit and examine the Flashback Version Query that was executed after the preceding commands.What could be the possible cause for the query not displaying any row?()A. Flashback logging is not enabled for the database.B. The changes made to the table are not committed.C. Supplemental logging is not enabled for the database.D. The database is not configured in ARCHIVELOG mode.
Evaluate this SQL statement:SELECT ename, sal, 12* sal+100 FROM emp;The SAL column stores the monthly salary of the employee. Which change must be made to the abovesyntax to calculate the annual compensation as monthly salary plus a monthly bonus of $100, multiplied by 12? ()A. No change is required to achieve the desired results.B. SELECT ename, sal, 12* (sal+100) FROM emp;C. SELECT ename, sal, (12* sal)+100 FROM emp;D. SELECT ename, sal +100,*12 FROM emp;
The EMP table has these columns:ENAME VARCHAR2(35)SALARY NUMBER(8,2)HIRE_DATE DATEManagement wants a list of names of employees who have been with the company for more than five years. Which SQL statement displays the required results? ()A. SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE 5;B. SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE 5;C. SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 5;D. SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 5;
下列叙述中,错误的是 ______ 。A.SELECT-SQL语句可以为输出的字段重新命名B.SELECT-SQL语句可以为输出的记录进行排序C.SELECT-SQL语句不能重新指定列的顺序D.SELECT-SQL语句不能省略FROM子句
对于第7题的两个基本表,有一个SQL语句: SELECT ENO, ENAME FROM EMP WHERE DNO NOT IN (SELECT DNO FROM DEPT WHERE DNAME='金工车间');其等价的关系代数表达式是:______。A.πENO,ENAME(σDNAME≠'金工车间'(EMPDEPT))B.πENO,ENAMEC.πENO,ENAME(EMP)-πENO,ENAME (σDNAME='金工车间'(EMPDEPT))D.πENO,ENAME (EMP)-πENO,ENAME (σDNAME≠'金工车间'(EMPDEPT))
对于以下SQL语句说法正确的是()SELECT ename FROM empWHERE sal IN (SELECT MAX(sal)FROM emp GROUP BY deptno); A. 这个语句是符合语法的B. 这个语句是不能执行的,因为缺少HAVING子句C. 这个语句是不能执行的,因为分组的条件列不在SELECT列表中D. 这个语句是不能执行的,因为GROUP BY子句应该在主查询中,而不是在子查询中E. 在主查询的WHERE条件中,不应该用IN,而应该用等号
在Oracle中,下面哪条语句当COMM字段为空时显示0,不为空时显示COMM的值()。 A.select ename,nvl(comm.,0)from empB.select ename,null(comm.,0)from empC.SELECT ename,NULLIF(comm,0)FROM empD.SELECT ename,DECODE(comm.,NULL,0)FROM emp
下列哪个语句查出雇员表(employees)里的雇员名字(ename)是‘SMITH’的信息,并且给雇员名字(ename)列定义一个别名Name()。A、select employeesno,ename Name,job from employees where ename=‘SMITH’B、select employeesno,ename ‘Name’,job from employees where ename=SMITHC、select employeesno,ename “Name”,job from employees where ename=‘SMITH’D、select employeesno,ename ‘Name’,job frome mployees wheree name=‘SMITH’
在Oracle中,下面哪条语句当COMM字段为空时显示0,不为空时显示COMM的值()。A、select ename,nvl(comm.,0)from empB、select ename,null(comm.,0)from empC、SELECT ename,NULLIF(comm,0)FROM empD、SELECT ename,DECODE(comm.,NULL,0)FROM emp
Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12?()A、SELECT ename, salary*12 'Annual Salary' FROM employees;B、SELECT ename, salary*12 "Annual Salary" FROM employees;C、SELECT ename, salary*12 AS Annual Salary FROM employees;D、SELECT ename, salary*12 AS INITCAP("ANNUAL SALARY") FROM employees
The EMPLOYEES table contains these columns: EMPLOYEE_ID NUMBER(4) ENAME VARCHAR2 (25) JOB_ID VARCHAR2(10) Which SQL statement will return the ENAME, length of the ENAME, and the numeric position of the letter "a" in the ENAME column, for those employees whose ENAME ends with a the letter "n"?()A、SELECT ENAME, LENGTH(ENAME), INSTR(ENAME, 'a') FROM EMPLOYEES WHERE SUBSTR (ENAME, -1,1) = 'n';B、SELECT ENAME, LENGTH(ENAME), INSTR(ENAME, ,-1,1) FROM EMPLOYEES WHERE SUBSTR (ENAME, -1,1) = 'n';C、SELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1,1) FROM EMPLOYEES WHERE INSTR (ENAME, 1,1) = 'n';D、SELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1,1) FROM EMPLOYEES WHERE INSTR (ENAME, -1,1) = 'n';
当你执行以下查询语句:SELECT employeesno,ename FROM employees WHERE employeesno=7782 OR employeesno=7876;在WHERE语句中,以下哪个操作符可以取代OR?()A、INB、BETWEEN……andC、LIKED、=
关于HQL与SQL,以下说法正确的是()A、HQL与SQL没什么差别B、HQL面向对象,而SQL操纵关系数据库C、在HQL与SQL中,都包含select,insert,update,delete语句D、HQL仅用于查询数据,不支持insert,update和delete语句
以下说法中()是不正确的。A、查询就是查询,它与SQL-SELECT语句无关B、查询是从指定的表和视图中提取满足条件的记录,然后按照想得到的输出类型定向输出查询结果C、查询就是预先定义好的一个SQL-SELECT语句D、查询是Visua lFoxPro支持的一种数据库对象
在Transact-SQL语法中,以下SELECT语句正确的是()。A、SELECT * FROM studentB、SELECT * FROM student WHERE GETDATE()C、SELECT * FROM student ORDER st_idD、SELECT * FROM student BY St_name
pl/sql中有4条与游标有关的语句,他们在程序中出现的正确顺序是() 1 open abc 2 cursor abc is select ename from emp 3 fetch abc into vname 4 close abc A、1234B、2134C、2314D、1324
The EMP table has these columns: ENAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATE Management wants a list of names of employees who have been with the company for more than five years. Which SQL statement displays the required results?()A、SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE 5;B、SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE 5;C、SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 5;D、SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 5;
单选题对于以下SQL语句说法正确的是() SELECT ename FROM emp WHERE sal IN (SELECT MAX(sal) FROM emp GROUP BY deptno);A这个语句是符合语法的B这个语句是不能执行的,因为缺少HAVING子句C这个语句是不能执行的,因为分组的条件列不在SELECT列表中D这个语句是不能执行的,因为GROUP BY子句应该在主查询中,而不是在子查询中E在主查询的WHERE条件中,不应该用IN,而应该用等号
单选题当你执行以下查询语句:SELECT employeesno,ename FROM employees WHERE employeesno=7782 OR employeesno=7876;在WHERE语句中,以下哪个操作符可以取代OR?()AINBBETWEEN……andCLIKED=