An error is generated.
You will have two identical tables in the HR schema with different names.
You create a table called employees in the HR schema based on you EMP table.
You create an alternative name for the employees table in the HR schema in your own schema.
第1题:
Examine the structure of the EMPLOYEES table:You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below:Which UPDATE statement meets the requirements?()
A.
B.
C.
D.
E.
第2题:
A.
B.
C.
D.
第3题:
A.
B.
C.
D.
第4题:
Click the Exhibit button to examine the data of the EMPLOYEES table. Evaluate this SQL statement:SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager"FROM employees e JOIN employees m ON (e.mgr_id = m.employee_id)AND e.salary > 4000;What is its output?()
A.A
B.B
C.C
D.D
E.E
第5题:
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?()
第6题:
Which is a valid CREATE TABLE statement?()
第7题:
The PRIMARY KEY is created along with a new index.
The PRIMARY KEY is created and it would use an existing unique index.
The PRIMARY KEY would be created in a disabled state because it is using an existing index.
The statement produces an error because the USING clause is permitted only in the CREATE TABLE command.
第8题:
CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);
CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id department_id FROM employees WHERE mgr_id IN (102, 120);
CREATE VIEW emp_Vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_ id;
CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;
第9题:
CREATE PUBLIC SYNONYM EDL_VU ON emp_dept_loc_vu
CREATE PUBLIC SYNONYM EDL:VU FOR mary (emp_dept_loc_vu);
CREATE PUBLIC SYNONYM EDL_VU FOR emp _dept_loc_vu;
CREATE SYNONYM EDL_VU ON emp_dept_loc_vu FOR EACH USER;
CREATE SYNONYM EDL_VU FOR EACH USER ON emp_dept_loc_vu
CREATE PUBLIC SYNONYM EDL_VU ON emp_dept_loc_vu FOR ALL USERS;
第10题:
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command CREATE PRIVATE SYNONYM EDL_VU FOR mary.EMP_DEPT_LOC_VU; then he can prefix the columns with this synonym.
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command CREATE SYNONYM EDL_VU FOR mary.EMP_DEPT_LOC_VU; then he can prefix the columns with this synonym.
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command CREATE LOCAL SYNONYM EDL_VU FOR mary.EMP_DEPT_LOC_VU; then he can prefix the columns with this synonym.
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command CREATE SYNONYM EDL_VU ON mary(EMP_DEPT_LOC_VU); then he can prefix the columns with this synonym.
Scott cannot create a synonym because synonyms can be created only for tables.
Scott cannot create any synonym for Mary's view. Mary should create a private synonym for the view and grant SELECT privilege on that synonym to Scott.
第11题:
INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did IN (20,50));
INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50)) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50) WITH CHECK OPTION) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
INSERT INTO (SELECT * FROM employees WHERE (department_id = 20 AND department_id = 50) WITH CHECK OPTION ) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
第12题:
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department _ id IN (10,20);
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;
CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WITH department_id IN (10,20);
CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;
第13题:
Examine the data in the EMPLOYEES and EMP_HIST tables:The EMP_HIST table is updated at the end of every year. The employee ID, name, job ID, and salary of each existing employee are modified with the latest data. New employee details are added to the table.Which statement accomplishes this task?()
A.
B.
C.
D.
第14题:
A.
B.
C.
D.
第15题:
Examine the data in the EMPLOYEES and DEPARTMENTS tables:Also examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables:On the EMPLOYEES table, EMPLOYEE_ID is the primary key.MGR_ID is the ID of managers and refers to the EMPLOYEE_ID.DEPT_ID is foreign key to DEPARTMENT_ID column of the DEPARTMENTS table.On the DEPARTMENTS table, DEPARTMENT_ID is the primary key.Examine this DELETE statement:What happens when you execute the DELETE statement?()
A. Only the row with department ID 40 is deleted in the DEPARTMENTS table.
B. The statement fails because there are child records in the EMPLOYEES table with department ID 40.
C. The row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 110 and 106 are deleted from the EMPLOYEES table.
D. The row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 106 and 110 and the employees working under employee 110 are deleted from the EMPLOYEES table.
E. The row with department ID 40 is deleted in the DEPARTMENTS table. Also all the rows in the EMPLOYEES table are deleted.
F. The statement fails because there are no columns specifies in the DELETE clause of the DELETE statement.
第16题:
Click the Exhibit button to examine the data of the EMPLOYEES table.Which statement lists the ID, name, and salary of the employee, and the ID and name of the employee‘s manager, for all the employees who have a manager and earn more than 4000?()
A.SELECT employee_id "Emp_id", emp_name "Employee", salary, employee_id "Mgr_id", emp_name "Manager" FROM employees WHERE salary > 4000;
B.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager" FROM employees e JOIN employees m WHERE e.mgr_id = m.mgr_id AND e.salary > 4000;
C.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager" FROM employees e JOIN employees m ON (e.mgr_id = m.employee_id) AND e.salary > 4000;
D.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.mgr_id "Mgr_id", m.emp_name "Manager" FROM employees e SELF JOIN employees m WHERE e.mgr_id = m.employee_id AND e.salary > 4000;
E.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.mgr_id "Mgr_id" m.emp_name "Manager" FROM employees e JOIN employees m USING (e.employee_id = m.employee_id) AND e.salary > 4000;
第17题:
Examine the data in the EMPLOYEES and DEPARTMENTS tables: EMPLOYEES EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_ID 101 Smith 20 120 SA_REP 4000 102 Martin 10 105 CLERK 2500 103 Chris 20 120 IT_ADMIN 4200 104 John 30 108 HR_CLERK 2500 105 Diana 30 108 IT_ADMIN 5000 106 Smith 40 110 AD_ASST 3000 108 Jennifer 30 110 HR_DIR 6500 110 Bob 40 EX_DIR 8000 120 Ravi 20 110 SA*DIR 6500 DEPARTMENTS DEPARTMENT_ID DEPARTMENT_NAME 10 Admin 20 Education 30 IT 40 Human Resources Also examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables: CREATE TABLE departments (department_id NUMBER PRIMARY KEY, department _ name VARCHAR2(30)); CREATE TABLE employees (EMPLOYEE_ID NUMBER PRIMARY KEY, EMP_NAME VARCHAR2(20), DEPT_ID NUMBER REFERENCES departments(department_id), MGR_ID NUMBER REFERENCES employees(employee id), MGR_ID NUMBER REFERENCES employees(employee id), JOB_ID VARCHAR2(15). SALARY NUMBER); ON the EMPLOYEES, On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. DEPT_ID is foreign key to DEPARTMENT_ID column of the DEPARTMENTS table. On the DEPARTMENTS table, DEPARTMENT_ID is the primary key. Examine this DELETE statement: DELETE FROM departments WHERE department id = 40; What happens when you execute the DELETE statement?()
第18题:
An error is generated.
You will have two identical tables in the HR schema with different names.
You create a table called employees in the HR schema based on you EMP table.
You create an alternative name for the employees table in the HR schema in your own schema.
第19题:
Scott can create a synonym for the EMP_DEPT_LOC_VU bus using the command: CREATE PRIVATE SYNONYM EDL_VU FOR mary.EMP DEPT_LOC_VU; then he can prefix the columns with this synonymn.
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command: CREATE SYNONYM EDL_VU FOR mary.EMP_DEPT_LOC_VU; then he can prefix the columns with this synonym.
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command: CREATE LOCAL SYNONYM EDL_VU FOR mary.EMP DEPT_LOC_VU; then he can prefix the columns with this synonym.
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command: CREATE SYNONYM EDL_VU ON mary(EMP_DEPT_LOC_VU); then he can prefix the columns with this synonym.
Scott cannot create a synonym because synonyms can be created only for tables.
Scott cannot create any synonym for Mary's view. Mary should create a private synonym for the view and grant SELECT privilege on that synonym to Scott.
第20题:
Scott can create a synonym for the EMP_DEPT_LOC_VU bus using the command: CREATE PRIVATE SYNONYM EDL_VU FOR mary. EMP DEPT_LOC_VU; then he can prefix the columns with this synonymn.
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command: CREATE SYNONYM EDL_VU FOR mary. EMP DEPT_LOC_VU; then he can prefix the columns with this synonym.
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command: CREATE LOCAL SYNONYM EDL_VU FOR mary. EMP DEPT_LOC_VU; then he can prefix the columns with this synonym.
Scott cannot create a synonym because synonyms can be created only for tables.
Scott cannot create any synonym for Mary's view. Mary should create a private synonym for the view and grant SELECT privilege on that synonym to Scott.
第21题:
Scott can create a synonym for the EMP_DEPT_LOC_VU bus using the command: CREATE PRIVATE SYNONYM EDL_VU FOR mary.EMP DEPT_LOC_VU; then he can prefix the columns with this synonymn.
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command: CREATE SYNONYM EDL_VU FOR mary.EMP_DEPT_LOC_VU; then he can prefix the columns with this synonym.
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command: CREATE LOCAL SYNONYM EDL_VU FOR mary.EMP DEPT_LOC_VU; then he can prefix the columns with this synonym.
Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command: CREATE SYNONYM EDL_VU ON mary(EMP_DEPT_LOC_VU); then he can prefix the columns with this synonym.
Scott cannot create a synonym because synonyms can be created only for tables.
Scott cannot create any synonym for Mary’s view. Mary should create a private ynonym for the view and grant SELECT privilege on that synonym to Scott.
第22题:
INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);
INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did IN (20,50));
INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50)) VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);
INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50) WITH CHECK OPTION) VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);
INSERT INTO (SELECT * FROM employees WHERE (department_id = 20 AND department_id = 50) WITH CHECK OPTION ) VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);
第23题:
CREATE VIEW emp_vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);
CREATE VIEW emp_vu AS SELECT employee_id, emp_name, job_id, department_id FROM employees WHERE mgr_id IN (102, 120);
CREATE VIEW emp_vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_id;
CREATE VIEW emp_vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;
第24题:
The SELECT statement is syntactically accurate.
The SELECT statement does not work because there is no HAVING clause.
The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.
The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.