更多"如果对关系emp(eno,ename,salary)成功执行下面的SQ"的相关试题:
[单项选择]
如果对关系emp(eno,ename,salary)成功执行下面的SQL语句:
CREATE CLUSTER INDEX name_index ON emp(salary)
对此结果的正确描述是()。
A. 在emp表上按salary升序创建了一个聚簇索引
B. 在emp表上按salary降序创建了一个聚簇索引
C. 在emp表上按salary升序创建了一个唯一索引
D. 在emp表上按salary降序创建了一个唯一索引
[单项选择]如果对关系emp(eno, ename, salary)成功执行下面的SQL语句: CREATE CLUSTER INDEX name index ON emp (salary) 对此结果的正确描述是
A. 在emp表上按salary升序创建了一个唯一索引
B. 在emp表上按salary降序创建了一个唯一索引
C. 在emp表上按salary升序创建了一个聚簇索引
D. 在emp表上按salary降序创建了一个聚簇索引
[单项选择] 如果对关系emp(eno,ename,salary)成功执行下面的SQL语句: CREATE CLUSTER INDEX name_index ON emp(salary) 对此结果的正确描述是()。
A. 在emp表上按salary升序创建了一个唯一索引
B. 在emp表上按salary降序创建了一个唯一索引
C. 在emp表上按salary升序创建了一个聚簇索引
D. 在emp表上按salary降序创建了一个聚簇索引
[单项选择]如果对关系emp(cno, ename, salary)成功执行下面的SQL语句: CREATE CLUSTER INDEX name_index ON emp(salary) 对此结果的正确描述是( )。
A. 在emp表上按salary升序创建了一个聚簇索引
B. 在emp表上按salary降序创建了一个聚簇索引
C. 在emp表上按salary升序创建了一个唯一索引
D. 在emp表上按salary降序创建了一个唯一索引
[单项选择]如果对关系emp(eno,ename,salray)成功执行下面的SQL语句:
CREATE CLUSTER INDEX name_index ON emp (salary)
对此结果的正确描述是
A. 在emp表上按salary升序创建了一个唯一索引
B. 在emp表上按salary降序创建了一个唯一索引
C. 在emp表上按salary升序创建了一个聚簇索引
D. 在emp表上按salary降序创建了一个聚簇索引
[单项选择]对于第7题的两个基本表,有一个SQL语句: SELECT ENO, ENAME FROM EMP WHERE DNO NOT IN (SELECT DNO FROM DEPT WHERE DNAME='金工车间');其等价的关系代数表达式是:______。
[单项选择]对于基本表EMP(ENO,ENAME,SALARY,DNO),其属性表示职工的工号、姓名、工资和所在部门的编号。基本表DEPT(DNO,DNAME)其属性表示部门的编号和部门名。有一SQL语句: SELECT COUNT (DI STINCT DNO)FROM EMP;其等价的查询语句是______。
A. 统计职工的总人数
B. 统计每一部门的职工人数
C. 统计职工服务的部门数目
D. 统计每一职工服务的部门数目
[单项选择] 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;
[单项选择] 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 above syntax 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;
[多项选择] Evaluate this SQL statement: SELECT e.emp_name, d.dept_name FROM employees e JOIN departments d USING (department_id) WHERE d.department_id NOT IN (10,40) ORSER BY dept_name; The statement fails when executed. Which change fixes the error?()
A. remove the ORDER BY clause
B. remove the table alias prefix from the WHERE clause
C. remove the table alias from the SELECT clause
D. prefix the column in the USING clause with the table alias
E. prefix the column in the ORDER BY clause with the table alias
F. replace the condition "d.department_id NOT IN (10,40)" in the WHERE clause with "d.department_id <> 10 AND d.department_id <> 40"
[单项选择] Evaluate the SQL statement: 1 SELECT a.emp_name, a.sal, a.dept_id, b.maxsal 2 FROM employees a, 3 (SELECT dept_id, MAX(sal) maxsal 4. FROM employees 5 GROUP BY dept_id) b 6 WHERE a.dept_id = b.dept_id 7 AND a. asl < b. maxsal; What is the result of the statement? ()
A. The statement produces an error at line 1.
B. The statement produces an error at line 3.
C. The statement produces an error at line 6.
D. The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all departments that pay less salary then the maximum salary paid in the company.
E. The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all employees who earn less than the maximum salary in their department.
[单项选择]对于第7题的两个基本表,有一个SQL语句: UPDATE EMP SET SALARY=SALARY*1.05 WHERE DNO='D6' AND SALARY<(SELECT AVG(SALARY) FROM EMP);其等价的修改语句为______。
A. 为工资低于D6部门平均工资的所有职工加薪5%
B. 为工资低于整个企业平均工资的职工加薪5%
C. 为在D6部门工作、工资低于整个企业平均工资的职工加薪5%
D. 为在D6部门工作、工资低于本部门平均工资的职工加薪5%
[单项选择]撤销U5对Emp表的查询权限,并收回U5授予其它用户的该权限,SQL语句是()。
A. REVOKE SELECT ON TABLE Emp FROM U5 CASCADE;
B. REVOKE SELECT ON TABLE Emp FROM U5 RESTRICT;
C. REVOKE QUERY ON TABLE Emp FROM U5 CASCADE;
D. GRANT SELECT ON TABLE Emp TO U5 WITH GRANT OPTION;