通过创建“雇员”表和“部门”表的视图来显示每个部门的薪金信息。 执行以下语句时会发生什么情况() CREATE OR REPLACE VIEW sal_dept AS SELECT SUM(e.salary) sal, d.department_name FROM employees e, departments d WHERE e.department_id = d.department_id GROUP BY d.department_name ORDER BY d.department_name.A、创建一个复杂视图,返回按部门名称排序的每个部门的薪金总和B、创建一个简单视图,返回按部门名称排序的每个部门的薪金总和C、创建一个复杂视图,返回按部门标识排序的每个部门的薪金总和D、不创建任何视图,因为该语句包含错误,该语句将失败

通过创建“雇员”表和“部门”表的视图来显示每个部门的薪金信息。 执行以下语句时会发生什么情况() CREATE OR REPLACE VIEW sal_dept AS SELECT SUM(e.salary) sal, d.department_name FROM employees e, departments d WHERE e.department_id = d.department_id GROUP BY d.department_name ORDER BY d.department_name.

  • A、创建一个复杂视图,返回按部门名称排序的每个部门的薪金总和
  • B、创建一个简单视图,返回按部门名称排序的每个部门的薪金总和
  • C、创建一个复杂视图,返回按部门标识排序的每个部门的薪金总和
  • D、不创建任何视图,因为该语句包含错误,该语句将失败

相关考题:

检索每个部门职工工资的总和,要求显示部门名称和工资,正确的命令是部门表(部门号N(4)、部门名称C(10))职工表(部门号N(4)、职工号C(4)、姓名C(8)、工资N(7,2))A.SELECT 部门号,SUM(工资)FROM 部门表,职工表; WHERE 职工表.部门号=部门表.部门号; GROUP BY部门号B.SELECT 部门号,SUM(工资)FROM职工表; WHERE 职工表.部门号=部门表.部门号; GROUP BY职工表.部门号C.SELECT 部门号,SUM(工资)FROM 部门表,职工表; WHERE 职工表.部门号=部门表.部门号; ORDRE BY职工表.部门号D.SELECT 部门号,SUM(工资)FROM 部门表,职工表; WHERE 职工表.部门号=部门表.部门号; GROUP BY职工表.部门号

检索每个部门的职工工资的总和,要求显示“部门名称”和“基本工资”,正确的语句是( )。A.SELECT部门名称,SUM(基本工资)FROM部门,职工; WHERE职工,部门号=部门.部门号; ORDER BY部门号B.SELECT部门名称,SUM(基本工资)FROM部门,职工; WHERE职工,部门号=部门.部门号; GROUP BY部门号C.SELECT部门名称,SUM(基本工资)FROM部门,职工; WHERE职工.部门号=部门.部门号; ORDRE BY职工.部门号D.SELECT部门名称,SUM(基本工资)FROM部门,职工; WHERE职工.部门号=部门.部门号; GROUP BY职工.部门号

根据SQL标准,创建一个视图abc,通过该视图只能对表student中系dept为‘IS’的记录进行更新操作。下面哪条语句适用?()A create view abc as select * from student where dept=’IS’B create view abc as select * from student where dept=’IS’ with check optionC create view abc as student where dept=’IS’D create view abc as select dept=’IS’ from student

检索每个部门的职工工资的总和,要求显示“部门名称”和“基本工资”,正确的命令是( )。A.SELECT 部门名称,SUM(基本工资) FROM 部门,职工; WHERE 职工.部门号=部门.部门号; ORDER BY 部门号B.SELECT 部门名称,SUM(基本工资) FROM 部门,职工; WHERE 职工.部门号=部门.部门号; GROUP BY 部门号C.SELECT 部门名称,SUM(基本工资) FROM 部门,职工; WHERE 职工.部门号=部门.部门号; ORDRE BY 职工.部门号D.SELECT 部门名称,SUM(基本工资) FROM 部门,职工; WHERE 职工.部门号=部门.部门号; GROUP BY 职工.部门号

检索每个部门的职工工资的总和,要求显示“部门名称”和“基本工资”.正确的语句是( )。A.SELECT部门名称,SUM(基本工资)FR0M部门, 职工 WHERE职工.部门号=部门.部门号 ORDER BY部门号B.SELECT部门名称,SUM(基本工资)FROM部门, 职1:WHERE职工.部门号=部门.部门号 GROUP BY部门号C.SELECT部门名称,SUM(基本工资)FROM部门,职工 WHERE职工部门号=部门.部门号 0RDRE BY职工部门号D.SELECT部门名称,SUM(基本工资)FROM部门, 职工 WHERE职工.部门号=部门.部门号 GROUP BY职工.部门号

评估以下语句:SELECT 部门标识,AVG(薪金) FROM 雇员 WHERE 职务标识69879 GROUP BY职务标识,部门标识 HAVINGAVG(薪金)35000 ORDERBY 部门标识;哪些子句用于限定结果?()A、SELECT部门标识,AVG(薪金)B、WHERE职务标识69879C、GROUP BY职务标识,部门标识D、HAVING AVG(薪金)35000

评估以下SELECT语句:SELECT雇员标识,姓氏,名字,薪金‘年薪’ FROM雇员 WHERE薪金ISNOTNULL ORDERBY姓氏,3;以下哪个子句有错误?()A、SELECT雇员标识,姓氏,名字,薪金’年薪’B、FROM雇员C、WHERE薪金IS NOT NULLD、ORDER BY姓氏,3;

评估以下 SELECT 语句:  SELECT 雇员标识,姓氏,名字,薪金,年薪’   FROM 雇员   WHERE 薪金 IS NOT NULL   ORDER BY 姓氏,3; 以下哪个子句有错误?()A、SELECT 雇员标识,姓氏,名字,薪金’年薪’B、FROM 雇员C、WHERE 薪金IS NOT NULLD、ORDER BY姓氏,3;

Evaluate this SQL statement: SELECT e.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID, d.DEPARTMENT_NAME FROM EMP e, DEPARTMENT d WHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID; In the statement, which capabilities of a SELECT statement are performed?()A、Selection, projection, joinB、Difference, projection, joinC、Selection, intersection, joinD、Intersection, projection, joinE、Difference, projection, product

用户SUSAN创建了“雇员”表,然后创建了视图“雇员视图”,此视图只显示雇员的“名字”和“姓氏”列。用户RUDI需要能访问“雇员”表中的“雇员”姓名但不能访问其它数据。SUSAN应执行以下哪条语句才允许此操作()A、SELECT*FROM雇员视图FOR rudiB、CREATE SYNONYM雇员视图FOR雇员C、GRANT SELECTON雇员视图TO rudiD、GRANT SELECTON雇员视图ONLY TO rudi

“雇员”表包含以下列: 雇员标识NUMBER 姓氏VARCHAR2(25) 名字VARCHAR2(25) 部门标识NUMBER 职务标识NUMBER 经理标识NUMBER 薪金NUMBER(9,2) 佣金NUMBER(7,2) 聘用日期DATE 以下哪条SELECT语句可用于显示部门70中薪金最低的10位员工()A、SELECT ROWNUM"排名",姓氏,名字"雇员",薪金"薪金"FROM(SELECT 姓氏,名字,薪金 FROM 雇员ORDER BY 薪金)WHERE ROWNUM=10 AND job_id LIKE’CLERK’AND department_id=70B、SELECT ROWNUM"排名",姓氏,名字"雇员",薪金"薪金"FROM(SELECT 姓氏,名字,薪金,职务标识FROM 雇员 WHERE 职务标识 LIKE’CLERK’AND 部门标识=70ORDER BY 薪金)WHERE ROWNUM=10C、SELECT ROWNUM"排名",姓氏,名字"雇员",薪金"薪金"FROM(SELECT 姓氏,名字,薪金,职务标识,部门标识 FROM 雇员 WHERE ROWNUM=10ORDER BY 薪金)WHERE 职务标识 LIKE’CLERK’AND 部门标识=70D、唯一的方法是使用数据字典

用户 SUSAN 创建了一个“雇员”表,然后又创建了一个“雇员_视图”视图,仅显示“雇员”表的“名字”列和“姓氏”列。用户 RUDI 需要能访问雇员的姓名,但不能访问“雇员”表中的其他数据。SUSAN 应使用哪条语句来实现这一点?()A、SELECT*FROM雇员_视图FOR rudi;B、CREATE SYNONYM雇员_视图FOR雇员;C、GRANT SELECT ON雇员_视图TO rudi;D、GRANT SELECT ON雇员_视图ONLY TO rudi;

有关系模式:学生表(学号,姓名,所在系),建立统计每个系的学生人数的视图的正确语句是()A、CREATE VIEW v1AS SELECT所在系,COUNT(*)FROM学生表GROUP BY所在系B、CREATEVIEW v1AS SELECT所在系,SUM(*)FROM学生表GROUP BY所在系C、CREATE VIEW v1(系名,人数)AS SELECT所在系,SUM(*)FROM学生表GROUP BY所在系D、CREATE VIEW v1(系名,人数)AS ELECT所在系,COUNT(*)FROM学生表GROUP BY所在系

You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20.Which SQL statement would you use to create the view EMP_VU?()A、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);B、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;C、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;D、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);E、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;

Click the Exhibit button and examine the data in the EMPLOYEES and DEPARTMENTS tables.You want to retrieve all employees, whether or not they have matching departments in the departments table. Which query would you use?()A、SELECT last_name, department_name FROM employees NATURAL JOIN departments;B、SELECT last_name, department_name FROM employees JOIN departments ;C、SELECT last_name, department_name FROM employees e JOIN departments d ON (e.department_id = d.department_id);D、SELECT last_name, department_name FROM employees e RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);E、SELECT last_name, department_name FROM employees FULL JOIN departments ON (e.department_id = d.department_id);F、SELECT last_name, department_name FROM employees e LEFT OUTER JOIN departments d ON (e.department_id = d.department_id);

Examine the structure of the EMPLOYEES and DEPARTMENTS tables: EMPLOYEES EMPLOYEE_ID NUMBER DEPARTMENT_ID NUMBER MANAGER_ID NUMBER LAST_NAME VARCHAR2(25) DEPARTMENTS DEPARTMENT_ID NUMBER MANAGER_ID NUMBER DEPARTMENT_NAME VARCHAR2(35) LOCATION_ID NUMBER You want to create a report displaying employee last names, department names, and locations. Which query should you use?()A、SELECT e.last_name, d. department_name, d.location_id FROM employees e NATURAL JOIN departments D USING department_id ;B、SELECT last_name, department_name, location_id FROM employees NATURAL JOIN departments WHERE e.department_id =d.department_id;C、SELECT e.last_name, d.department_name, d.location_id FROM employees e NATURAL JOIN departments d;D、SELECT e.last_name, d.department_name, d.location_id FROM employees e JOIN departments d USING (department_id );

You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables: EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME. The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary key DEPARTMENT_ID column of the DEPARTMENTS table. You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables. How can you accomplish this task?()A、ALTER VIEW EMP_dept_vu (ADD manger_id NUMBER);B、MODIFY VIEW EMP_dept_vu (ADD manger_id NUMBER);C、ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department _ id = d.department_id;D、MODIFY VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;E、CREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;F、You must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.

You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables: EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME. The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary key DEPARTMENT_ID column of the DEPARTMENTS table. You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables. How can you accomplish this task?()A、ALTER VIEW emp_dept_vu (ADD manager_id NUMBER);B、MODIFY VIEW emp_dept_vu (ADD manager_id NUMBER);C、ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department_id = d.department_id;D、MODIFY VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department_id = d.department_id;E、CREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department_id = d.department_id;F、You must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.

Examine the structure of the EMPLOYEES and DEPARTMENTS tables: EMPLOYEES EMPLOYEE_ID NUMBER DEPARTMENT_ID NUMBER MANAGER_ID NUMBER LAST_NAME VARCHAR2(25) DEPARTMENTS DEPARTMENT_ID NUMBER MANAGER_ID NUMBER DEPARTMENT_NAME VARCHAR2(35) LOCATION_ID NUMBER You want to create a report displaying employee last names, department names, and locations. Which query should you use to create an equi-join?()A、SELECT last_name, department_name, location_id FROM employees , department ;B、SELECT employees.last_name, departments.department_name, departments.location_id FROM employees e, departments D WHERE e.department_id = d.department_id;C、SELECT e.last_name, d.department_name, d.location_id FROM employees e, departments D WHERE manager_id = manager_id;D、SELECT e.last_name, d.department_name, d.location_id FROM employees e, departments D WHERE e.department_id = d.department_id;

You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20. Which SQL statement would you use to create the view EMP_VU? ()A、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department _ id IN (10,20);B、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;C、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;D、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WITH department_id IN (10,20);E、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;

单选题You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables: EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME. The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary key DEPARTMENT_ID column of the DEPARTMENTS table. You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables. How can you accomplish this task?()AALTER VIEW emp_dept_vu (ADD manager_id NUMBER);BMODIFY VIEW emp_dept_vu (ADD manager_id NUMBER);CALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department_id = d.department_id;DMODIFY VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department_id = d.department_id;ECREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department_id = d.department_id;FYou must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.

单选题Examine the structure of the EMPLOYEES and DEPARTMENTS tables: EMPLOYEES EMPLOYEE_ID NUMBER DEPARTMENT_ID NUMBER MANAGER_ID NUMBER LAST_NAME VARCHAR2(25) DEPARTMENTS DEPARTMENT_ID NUMBER MANAGER_ID NUMBER DEPARTMENT_NAME VARCHAR2(35) LOCATION_ID NUMBER You want to create a report displaying employee last names, department names, and locations. Which query should you use to create an equi-join?()ASELECT last_name, department_name, location_id FROM employees , department ;BSELECT employees.last_name, departments.department_name, departments.location_id FROM employees e, departments D WHERE e.department_id = d.department_id;CSELECT e.last_name, d.department_name, d.location_id FROM employees e, departments D WHERE manager_id = manager_id;DSELECT e.last_name, d.department_name, d.location_id FROM employees e, departments D WHERE e.department_id = d.department_id;

单选题“雇员”表包含以下列: 雇员标识NUMBER 姓氏VARCHAR2(25) 名字VARCHAR2(25) 部门标识NUMBER 职务标识NUMBER 经理标识NUMBER 薪金NUMBER(9,2) 佣金NUMBER(7,2) 聘用日期DATE 以下哪条SELECT语句可用于显示部门70中薪金最低的10位员工()ASELECT ROWNUM排名,姓氏,名字雇员,薪金薪金FROM(SELECT 姓氏,名字,薪金 FROM 雇员ORDER BY 薪金)WHERE ROWNUM=10 AND job_id LIKE’CLERK’AND department_id=70BSELECT ROWNUM排名,姓氏,名字雇员,薪金薪金FROM(SELECT 姓氏,名字,薪金,职务标识FROM 雇员 WHERE 职务标识 LIKE’CLERK’AND 部门标识=70ORDER BY 薪金)WHERE ROWNUM=10CSELECT ROWNUM排名,姓氏,名字雇员,薪金薪金FROM(SELECT 姓氏,名字,薪金,职务标识,部门标识 FROM 雇员 WHERE ROWNUM=10ORDER BY 薪金)WHERE 职务标识 LIKE’CLERK’AND 部门标识=70D唯一的方法是使用数据字典

单选题评估此CREATE VIEW语句: CREATE VIEW emp_view AS SELECT SUM(salary) FROM employees; 以下哪个说法是的()A使用“雇员视图”视图不能更新“雇员”表中的数据B使用“雇员视图”视图可以更新“雇员”表中的任何数据C使用“雇员视图”视图不能删除“雇员”表中的记录D使用“雇员视图”视图仅能更新“雇员”表中的“薪金”列

单选题通过创建“雇员”表和“部门”表的视图来显示每个部门的薪金信息。 执行以下语句时会发生什么情况() CREATE OR REPLACE VIEW sal_dept AS SELECT SUM(e.salary) sal, d.department_name FROM employees e, departments d WHERE e.department_id = d.department_id GROUP BY d.department_name ORDER BY d.department_name.A创建一个复杂视图,返回按部门名称排序的每个部门的薪金总和B创建一个简单视图,返回按部门名称排序的每个部门的薪金总和C创建一个复杂视图,返回按部门标识排序的每个部门的薪金总和D不创建任何视图,因为该语句包含错误,该语句将失败

单选题有关系模式:学生表(学号,姓名,所在系),建立统计每个系的学生人数的视图的正确语句是()ACREATE VIEW v1AS SELECT所在系,COUNT(*)FROM学生表GROUP BY所在系BCREATEVIEW v1AS SELECT所在系,SUM(*)FROM学生表GROUP BY所在系CCREATE VIEW v1(系名,人数)AS SELECT所在系,SUM(*)FROM学生表GROUP BY所在系DCREATE VIEW v1(系名,人数)AS ELECT所在系,COUNT(*)FROM学生表GROUP BY所在系

单选题Examine the structure of the EMPLOYEES and DEPARTMENTS tables: EMPLOYEES EMPLOYEE_ID NUMBER DEPARTMENT_ID NUMBER MANAGER_ID NUMBER LAST_NAME VARCHAR2(25) DEPARTMENTS DEPARTMENT_ID NUMBER MANAGER_ID NUMBER DEPARTMENT_NAME VARCHAR2(35) LOCATION_ID NUMBER You want to create a report displaying employee last names, department names, and locations. Which query should you use?()ASELECT e.last_name, d. department_name, d.location_id FROM employees e NATURAL JOIN departments D USING department_id ;BSELECT last_name, department_name, location_id FROM employees NATURAL JOIN departments WHERE e.department_id =d.department_id;CSELECT e.last_name, d.department_name, d.location_id FROM employees e NATURAL JOIN departments d;DSELECT e.last_name, d.department_name, d.location_id FROM employees e JOIN departments d USING (department_id );

( 难度:中等)以下哪些Mysql语句是正确的?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<300;E.select * from where deptno=1 group by sal;