You need to find out the names of all employees who belong to the same department as the employee 'Jessica Butcher' who is in department 100 and has an employee ID 40. Which of the following queries will be correct? EMPLOYEES Type NOT NULL NUMBER(4) VARCHAR2(10) VARCHAR2(10) VARCHAR2(9) VARCHAR2(4) DATE Name Null? EMP ID FIRST NAME LAST NAME JOB MGR HIRE DATE SALARY NOT NULL NUMBER NUMBER(7,2) NUMBER(2) COMM. PCT DEPT ID DEPARTMENTS Name Null? DEPT ID DEPT NAME DEPT LOC Type NUMBER VARCHARZ(20) VARCHAR2(20) O SELECT first_name, last_name FROM employees WHERE last_name = "Butcher And first_name = 'Jessica O SELECT first_name, last_name FROM employees WHERE department = 100; o SELECT first_name, last_name FROM employees WHERE department = (SELECT department FROM employees WHERE first_name = 'Jessica' AND last_name = "Butcher); O SELECT first_name, last_name FROM employees WHERE department = (SELECT department FROM employees WHERE first_name = 'Jessica' AND last_name = 'Butcher AND department = 100 AND employee_id = 40);
You need to find out the names of all employees who belong to the same department as the employee 'Jessica Butcher' who is in department 100 and has an employee ID 40. Which of the following queries will be correct? EMPLOYEES Type NOT NULL NUMBER(4) VARCHAR2(10) VARCHAR2(10) VARCHAR2(9) VARCHAR2(4) DATE Name Null? EMP ID FIRST NAME LAST NAME JOB MGR HIRE DATE SALARY NOT NULL NUMBER NUMBER(7,2) NUMBER(2) COMM. PCT DEPT ID DEPARTMENTS Name Null? DEPT ID DEPT NAME DEPT LOC Type NUMBER VARCHARZ(20) VARCHAR2(20) O SELECT first_name, last_name FROM employees WHERE last_name = "Butcher And first_name = 'Jessica O SELECT first_name, last_name FROM employees WHERE department = 100; o SELECT first_name, last_name FROM employees WHERE department = (SELECT department FROM employees WHERE first_name = 'Jessica' AND last_name = "Butcher); O SELECT first_name, last_name FROM employees WHERE department = (SELECT department FROM employees WHERE first_name = 'Jessica' AND last_name = 'Butcher AND department = 100 AND employee_id = 40);
Chapter8: Restricting Rows And Sorting Data
Section: Chapter Questions
Problem 4MC
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Recommended textbooks for you