Choose the correct SET operator to fill in the blank space and complete the following query…

View the Exhibit and examine the structure of the EMPLOYEES and JOB_HISTORY tables. The query should display the employee IDs of all the employees who have held the job SA_MAN at any time during their tenure. Choose the correct SET operator to fill in the blank space and complete the following query.
SELECT employee_id
FROM employees
WHERE job_id = ‘SA_MAN’
____________ SELECT employee_id
FROM job_history
WHERE job_id=’SA_MAN’;

View the Exhibit and examine the structure of the EMPLOYEES and JOB_HISTORY tables.

The query should display the employee IDs of all the employees who have held the job SA_MAN at any time during their tenure.

Choose the correct SET operator to fill in the blank space and complete the following query.

SELECT employee_id
FROM employees
WHERE job_id = ‘SA_MAN’
____________ SELECT employee_id
FROM job_history
WHERE job_id=’SA_MAN’;

A.
UNION

B.
MINUS

C.
INTERSECT

D.
UNION ALL



Leave a Reply 4

Your email address will not be published. Required fields are marked *


user

user

select * from tt1
union
select * from tt2;

user

user

select * from tt1
union all
select * from tt2 order by 1;

user

user

select * from tt1
INTERSECT
select * from tt2 order by 1;

select * from tt1
minus
select * from tt2 order by 1;

User

User

If you use INTERSECT, only records from both table with same employee ID would display.
If UNION ALL, will have duplicate employees from both table with same ID.