网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
执行如下两个查询,结果为() Select ename name,sal salary from emp order by salary Select ename name,sal“salary”from emp order by sal asc
- A、两个查询结果完全相同
- B、第一个查询正确,第二个查询错误
- C、两个查询结构不同
- D、第二个查询正确,第一个查询错误
参考答案
更多 “ 执行如下两个查询,结果为() Select ename name,sal salary from emp order by salary Select ename name,sal“salary”from emp order by sal ascA、两个查询结果完全相同B、第一个查询正确,第二个查询错误C、两个查询结构不同D、第二个查询正确,第一个查询错误” 相关考题
考题
当你执行以下查询语句: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’
考题
职员关系模式为E(Eno,Ename,Dept,Eage,Eaddr)。其中,Eno表示职员号,Ename表示职员名,Dept表示职员所在部门,Eage表示年龄,Eaddr表示职员的家庭住址。建立“开发部”(DS表示开发部)职员的视图DS_E如下,要求进行修改、插入操作时保证该视图只有开发部的职员。CREATE VIEW DS_EAS SELECT Eno,Ename,Dept,Eage,EaddrFROM EWHERE(47);如下SQL语句可以查询开发部姓“王”职员的姓名和家庭住址。Select Ename, EaddrFrom DS_EWhere(48);A.Dept=DSB.Dept=DS WITH CHECK OPTIONC.Dept='DS'D.Dept='DS' WITH CHECK OPTION
考题
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;
考题
已知成绩关系如下图所示。执行SQL语句:SELECT COUNT (DISTINCT 学号)FROM 成绩WHERE 分数>60查询结果中包含的元组数目是成绩学号 课程号 分数A.1B.2C.3D.4
考题
对于第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语句集合的并运算的说法,下列错误的是( )。A.在SQL语句中不能使用UNION来组合子查询B.两个SELECT命令的查询结果中的列数不一定相同C.两个SELECT查询结果中的对应列必须有相同的数据类型D.两个SELECT查询结果中的对应列必须有相同的宽度
考题
已知成绩关系如下图所示。执行SQL语句: SELECT COUNT(DISTINCT 学号) FROM 成绩 WHERE 分数>60 查询结果中包含的元组数目是 成绩A.1B.2C.3D.4
考题
对于以下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、=
考题
查询出所有名字以’S’开始的员工()A、select * from emp where ename in 'S%';B、select * from emp where ename='S%';C、select * from emp where ename like 'S%';D、select * from emp where ename like 'S_';
考题
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 ename name,sal salary from emp order by salary Select ename name,sal“salary”from emp order by sal ascA
两个查询结果完全相同B
第一个查询正确,第二个查询错误C
两个查询结构不同D
第二个查询正确,第一个查询错误
考题
单选题当你执行以下查询语句:SELECT employeesno,ename FROM employees WHERE employeesno=7782 OR employeesno=7876;在WHERE语句中,以下哪个操作符可以取代OR?()A
INB
BETWEEN……andC
LIKED
=
考题
单选题将两个SELECT语句的查询结果通过并运算合并成一个查询结果,需要使用的关键字是( )。A
JOINB
UNIONC
ALLD
MINUS
热门标签
最新试卷