quiz
identify the set of operator guidelines
- the expression in the SELECT list must match in number
- parenthesis may not be used to alter the sequence of execution
- the data type of each column in the second in the second query must match the data type of its corresponding column in the first query
- the ORDER BY clause can be used only once in a compound query , unless a UNION ALL operator is used
Tasks
- The HR department needs a list of Department IDs for departments that do not contain the job ID of ST_CLERK> Use a set operator to create this report.
- Same department requests a list of countries that have no departments located in them. Display country ID and the country name. Use SET operators. The first result looks like:
- The Vice President needs very quickly a list of departments 10, 50, 20 in that order. job and department ID are to be displayed.
- Create a statement that lists the employeeIDs and JobIDs of those employees who currently have a job title that is the same as their job title when they were initially hired by the company (that is, they changed jobs but have now gone back to doing their original job).
- The HR department needs a SINGLE report with the following specifications:
- Last name and department ID of all employees regardless of whether they belong to a department or not.
- Department ID and department name of all departments regardless of whether they have employees in them or not.
Write a compound query to accomplish this.
Reviews
There are no reviews yet.