单选题EMPLOYEES and DEPARTMENTS data: EMPLOYEES DEMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_I 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 On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID managers and refers to the EMPLOYEE_ID. On the DEPARTMENTS table DEPARTMENT_ID is the primary key. Evaluate this UPDATE statement. UPDATE employees SET mgr_id = (SELECT mgr_id FROM employees WHERE dept_id= (SELECT department_id FROM departments WHERE department_name = 'Administration')), Salary = (SELECT salary FROM employees WHERE emp_name = 'Smith') WHERE job_id = 'IT_ADMIN'; What happens when the statement is executed?()AThe statement executes successfully, leaves the manager ID as the existing value, and changes the salary to 4000 for the employees with ID 103 and 105.BThe statement executes successfully, changes the manager ID to NULL, and changes the salary to 4000 for the employees with ID 103 and 105.CThe statement executes successfully, changes the manager ID to NULL, and changes the salary to 3000 for the employees with ID 103 and 105.DThe statement fails because there is more than one row matching the employee name Smith.EThe statement fails because there is more than one row matching the IT_ADMIN job ID in the EMPLOYEES table.FThe statement fails because there is no 'Administration' department in the DEPARTMENTS table.

单选题
EMPLOYEES and DEPARTMENTS data: EMPLOYEES DEMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_I 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 On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID managers and refers to the EMPLOYEE_ID. On the DEPARTMENTS table DEPARTMENT_ID is the primary key. Evaluate this UPDATE statement. UPDATE employees SET mgr_id = (SELECT mgr_id FROM employees WHERE dept_id= (SELECT department_id FROM departments WHERE department_name = 'Administration')), Salary = (SELECT salary FROM employees WHERE emp_name = 'Smith') WHERE job_id = 'IT_ADMIN'; What happens when the statement is executed?()
A

The statement executes successfully, leaves the manager ID as the existing value, and changes the salary to 4000 for the employees with ID 103 and 105.

B

The statement executes successfully, changes the manager ID to NULL, and changes the salary to 4000 for the employees with ID 103 and 105.

C

The statement executes successfully, changes the manager ID to NULL, and changes the salary to 3000 for the employees with ID 103 and 105.

D

The statement fails because there is more than one row matching the employee name Smith.

E

The statement fails because there is more than one row matching the IT_ADMIN job ID in the EMPLOYEES table.

F

The statement fails because there is no 'Administration' department in the DEPARTMENTS table.


参考解析

解析: 暂无解析

相关考题:

在执行语句SELECT department_id FROM employees,departments WHERE employees.department_id= departments.department_id;时报错,原因是()。 A.没有给表employees和表departments加别名B.没有给列department_id加别名C.不能用employees.department_id=departments.department_id作为条件D.SELECT后面的department_id没有指定是哪个表

You added a PHONE_NUMBER column of NUMBER data type to an existing EMPLOYEES table. The EMPLOYEES table already contains records of 100 employees. Now, you want to enter the phone numbers of each of the 100 employees into the table. Some of the employees may not have a phone number available. Which data manipulation operation do you perform? ()A. MERGEB. INSERTC. UPDATED. ADDE. ENTERF. You cannot enter the phone numbers for the existing employee records.

Examine the description of the EMPLOYEES table:EMP_ID NUMBER(4) NOT NULLLAST_NAME VARCHAR2(30) NOT NULLFIRST_NAME VARCHAR2(30)DEPT_ID NUMBER(2)JOB_CAT VARCHARD2(30)SALARY NUMBER(8,2)Which statement shows the maximum salary paid in each job category of each department? ()A. SELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary MAX (salary);B. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;C. SELECT dept_id, job_cat, MAX(salary) FROM employees;D. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;E. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;

Examine the structure of the EMPLOYEES, DEPARTMENTS, and TAX tables.For which situation would you use a nonequijoin query?() A. To find the tax percentage for each of the employees.B. To list the name, job id, and manager name for all the employees.C. To find the name, salary, and department name of employees who are not working with Smith.D. To find the number of employees working for the Administrative department and earning less then 4000.E. To display name, salary, manager ID, and department name of all the employees, even if the employees do not have a department ID assigned.

Examine the data in the EMPLOYEES table.On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.Evaluate this DELETE statement:Why does the DELETE statement fail when you execute it?()A. There is no row with dept_id 90 in the EMPLOYEES table.B. You cannot delete the JOB_ID column because it is a NOT NULL column.C. You cannot specify column names in the DELETE clause of the DELETE statement.D. You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.

Examine the structure of the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables.Which two SQL statements produce the name, department name, and the city of all the employees who earn more then 10000?() A.B.C.D.

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.

Examine the data in the EMPLOYEES and DEPARTMENTS tables:EMPLOYEESEMP_NAME DEPT_ID MGR_ID JOB_ID SALARYEMPLOYEE_ID101 Smith 20 120 SA_REP 4000102 Martin 10 105 CLERK 2500103 Chris 20 120 IT_ADMIN 4200104 John 30 108 HR_CLERK 2500105 Diana 30 108 IT_ADMIN 5000106 Smith 40 110 AD_ASST 3000108 Jennifer 30 110 HR_DIR 6500110 Bob 40 EX_DIR 8000120 Ravi 20 110 SA*DIR 6500DEPARTMENTSDEPARTMENT_ID DEPARTMENT_NAME10 Admin20 Education30 IT40 Human ResourcesAlso 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 REFERENCESdepartments(department_id),MGR_ID NUMBER REFERENCESemployees(employee id),MGR_ID NUMBER REFERENCESemployees(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:DELETEFROM departmentsWHERE department id = 40;What happens when you execute the DELETE statement?()

Click the Exhibit button and examine the data in the EMPLOYEES and DEPARTMENTS tables.You want to retrieve all employees‘ last names, along with their managers‘ last names and their department names. Which query would you use?()A.SELECT last_name, manager_id, department_name FROM employees e FULL OUTER JOIN departments d ON (e.department_id = d.department_id);B.SELECT e.last_name, m.last_name, department_name FROM employees e LEFT OUTER JOIN employees m on ( e.manager_id = m.employee_id) LEFT OUTER JOIN departments d ON (e.department_id = d.department_id);C.SELECT e.last_name, m.last_name, department_name FROM employees e RIGHT OUTER JOIN employees m on ( e.manager_id = m.employee_id) LEFT OUTER JOIN departments d ON (e.department_id = d.department_id);D.SELECT e.last_name, m.last_name, department_name FROM employees e LEFT OUTER JOIN employees m on ( e.manager_id = m.employee_id) RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);E.SELECT e.last_name, m.last_name, department_name FROM employees e RIGHT OUTER JOIN employees m on ( e.manager_id = m.employee_id) RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);F.SELECT last_name, manager_id, department_name FROM employees e JOIN departments d ON (e.department_id = d.department_id) ;

Click the Exhibit button and examine the data from the EMP table.The COMMISSION column shows the monthly commission earned by the employee.Which two tasks would require subqueries or joins in order to be performed in a single step? ()A.listing the employees who earn the same amount of commission as employee 3B.finding the total commission earned by the employees in department 10C.finding the number of employees who earn a commission that is higher than the average commission of the companyD.listing the departments whose average commission is more than 600E.listing the employees who do not earn commission and who are working for department 20 in descending order of the employee IDF.listing the employees whose annual commission is more than 6000

Click the Exhibit button and examine the data in the EMPLOYEES table.On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.Evaluate this DELETE statement:DELETE employee_id, salary, job_idFROM employeesWHERE dept_id = 90;Why does the DELETE statement fail when you execute it?()A.There is no row with dept_id 90 in the EMPLOYEES table.B.You cannot delete the JOB_ID column because it is a NOT NULL column.C.You cannot specify column names in the DELETE clause of the DELETE statement.D.You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.

You added a PHONE_NUMBER column of NUMBER data type to an existing EMPLOYEES table. The EMPLOYEES table already contains records of 100 employees. Now, you want to enter the phone numbers of each of the 100 employees into the table. Some of the employees may not have a phone number available. Which data manipulation operation do you perform?()A、MERGEB、INSERTC、UPDATED、ADDE、ENTERF、You cannot enter the phone numbers for the existing employee records.

在执行语句SELECT department_id FROM employees,departments WHERE employees.department_id= departments.department_id;时报错,原因是()。A、没有给表employees和表departments加别名B、没有给列department_id加别名C、不能用employees.department_id=departments.department_id作为条件D、SELECT后面的department_id没有指定是哪个表

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?()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.

单选题Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_ NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only if the minimum salary is less than 5000 and maximum salary is more than 15000?()ASELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) 5000 AND MAX(salary) 15000;BSELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) 5000 AND MAX(salary) 15000 GROUP BY dept_id;CSELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) 5000 AND MAX(salary) 15000;DSELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN(salary) 5000 AND MAX(salary) 15000;ESELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN(salary) 5000 AND MAX(salary) 15000;

单选题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?()AOnly the row with department ID 40 is deleted in the DEPARTMENTS table.BThe statement fails because there are child records in the EMPLOYEES table with department ID 40.CThe 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.DThe 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.EThe row with department ID 40 is deleted in the DEPARTMENTS table. Also all the rows in the EMPLOYEES table are deleted.FThe statement fails because there are no columns specifies in the DELETE clause of the DELETE statement.

单选题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;

单选题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?()AThe statement produces an error at line 1.BThe statement produces an error at line 3.CThe statement produces an error at line 6.DThe 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.EThe 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.

单选题Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) Which statement produces the number of different departments that have employees with last name Smith? ()ASELECT COUNT (*) FROM employees WHERE last _name='smith';BSELECT COUNT (dept_id) FROM employees WHERE last _name='smith';CSELECT DISTINCT (COUNT (dept_id) FROM employees WHERE last _name='smith';DSELECT COUNT (DISTINCT dept_id) FROM employees WHERE last _name='smith';ESELECT UNIQE (dept_id) FROM employees WHERE last _name='smith';

单选题Examine the structure of the EMPLOYEES and DEPARTMENTS tables: EMPLOYEESColumn name Data type Remarks EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2 (30) JOB_ID VARCHAR2 (20) SALARY NUMBER MGR_ID NUMBER References EMPLOYEE_ID COLUMN DEPARTMENT ID NUMBER Foreign key to DEPARTMENT ID column of the DEPARTMENTS table DEPARTMENTSColumn name Data type Remarks DEPARTMENT_ID NUMBER NOT NULL, Primary Key DEPARTMENT_NAME VARCHAR2(30) MGR_ID NUMBER References MGR_ID column of the EMPLOYEES table Evaluate this SQL statement: SELECT employee_id, e.department_id, department_name, salary FROM employees e, departments d WHERE e. department_id = d.department_id; Which SQL statement is equivalent to the above SQL statement? ()ASELECT employee_id, department_id, department_name, salary FROM employees WHERE department_id IN (SELECT department_id FROM departments);BSELECT employee_id, department_id, department_name, salary FROM employees NATURAL JOIN departments;CSELECT employee_id, d.department_id, department_name, salary FROM employees e JOIN departments d ON e.department _ id = d. department_id;DSELECT employee_id, department_id, department_name, Salary FROM employees JOIN departments USING (e.department_id, d.department_id);

单选题You added a PHONE_NUMBER column of NUMBER data type to an existing EMPLOYEES table. The EMPLOYEES table already contains records of 100 employees. Now, you want to enter the phone numbers of each of the 100 employees into the table. Some of the employees may not have a phone number available. Which data manipulation operation do you perform?()AMERGEBINSERTCUPDATEDADDEENTERFYou cannot enter the phone numbers for the existing employee records.

单选题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?()ASELECT last_name, department_name FROM employees NATURAL JOIN departments;BSELECT last_name, department_name FROM employees JOIN departments ;CSELECT last_name, department_name FROM employees e JOIN departments d ON (e.department_id = d.department_id);DSELECT last_name, department_name FROM employees e RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);ESELECT last_name, department_name FROM employees FULL JOIN departments ON (e.department_id = d.department_id);FSELECT last_name, department_name FROM employees e LEFT OUTER JOIN departments d ON (e.department_id = d.department_id);

单选题Examine the data in the EMPLOYEES and DEPARTMENTS tables. EMPLOYEES LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 30 5000 Kochhar 5000 DEPARTMENTS DEPARTMENT_ID DEPARTMENT_NAME 10 Sales 20 Marketing 30 Accounts 40 Administration You want to retrieve all employees, whether or not they have matching departments in the departments table. Which query would you use?()ASELECT last_name, department_name FROM employees , departments(+);BSELECT last_name, department_name FROM employees JOIN departments(+);CSELECT last_name, department_name ON (e. department_ id = d. departments_id); FROM employees(+) e JOIN departments dDSELECT last_name, department_name FROM employees e RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);ESELECT last_name, department_name FROM employees(+) , departments ON (e. department _ id = d. department _id);FSELECT 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: EMPLOYEESColumn name Data type Remarks EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2 (30) JOB_ID VARCHAR2 (20) SALARY NUMBER MGR_ID NUMBER References EMPLOYEE_ID COLUMN DEPARTMENT ID NUMBER Foreign key to DEPARTMENT ID column of the DEPARTMENTS table DEPARTMENTSColumn name Data type Remarks DEPARTMENT_ID NUMBER NOT NULL, Primary Key DEPARTMENT_NAME VARCHAR2(30) MGR_ID NUMBER References MGR_ID column of the EMPLOYEES table Evaluate this SQL statement: SELECT employee_id, e.department_id, department_name, salary FROM employees e, departments d WHERE e. department_id = d.department_id; Which SQL statement is equivalent to the above SQL statement?()ASELECT employee_id, department_id, department_name, salary FROM employees WHERE department_id IN (SELECT department_id FROM departments);BSELECT employee_id, department_id, department_name, salary FROM employees NATURAL JOIN departments;CSELECT employee_id, d.department_id, department_name, salary FROM employees e JOIN departments d ON e.department _ id = d. department_id;DSELECT employee_id, department_id, department_name, Salary FROM employees JOIN departments USING (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?()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 );

单选题Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHARD2(30) SALARY NUMBER(8,2) Which statement shows the maximum salary paid in each job category of each department?()ASELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary MAX (salary);BSELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;CSELECT dept_id, job_cat, MAX(salary) FROM employees;DSELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;ESELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;

单选题Examine the structure of the EMPLOYEES, DEPARTMENTS, and TAX tables. EMPLOYEES NOT NULL, Primary EMPLOYEE_ID NUMBER Key VARCHAR2 EMP_NAME (30) VARCHAR2 JOB_ID (20) SALARY NUMBER References MGR_ID NUMBER EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table DEPARTMENTS NOT NULL, DEPARTMENT_ID NUMBER Primary Key VARCHAR2 DEPARTMENT_NAME |30| References MGR_ID column MGR_ID NUMBER of the EMPLOYEES table TAX MIN_SALARY NUMBER MAX_SALARY NUMBER TAX_PERCENT NUMBER For which situation would you use a nonequijoin query?()ATo find the tax percentage for each of the employees.BTo list the name, job id, and manager name for all the employees.CTo find the name, salary, and department name of employees who are not working with Smith.DTo find the number of employees working for the Administrative department and earning less then 4000.ETo display name, salary, manager ID, and department name of all the employees, even if the employees do not have a department ID assigned.