Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Based on the following Relational Schema: EMPLOYEES (EMP_ID, EMP_NAME, EMAIL, HP_NUMBER, HIRE_DATE, SALARY, COMMISSION, MANAGER_ID, DEPT_ID*) DEPARTMENT (DEPT_ID, DEPT_NAME, LOCATION_ID, MANAGER_ID) Write a complete SQL

Based on the following Relational Schema:

EMPLOYEES (EMP_ID, EMP_NAME, EMAIL, HP_NUMBER, HIRE_DATE, SALARY, COMMISSION, MANAGER_ID, DEPT_ID*)

DEPARTMENT (DEPT_ID, DEPT_NAME, LOCATION_ID, MANAGER_ID)

Write a complete SQL command for each of the following questions.

a) Using Type I nested query, list all the information of the employees who does not work in departments where the manager id within range of 100 and 200. [3 marks]

b) Using Type II nested query, list all the information of the employees who attached to Human Resources Department. [3 marks]

c) Create a view for all employees with columns EMP_ID, EMP_NAME, DEPT_ID and salary more than RM3,000. [ 3 marks]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

College Accounting

Authors: James A Heintz, Robert W Parry

20th Edition

538745215, 978-1111624743

More Books

Students also viewed these Accounting questions

Question

Present main arguments for and against the computer metaphor.

Answered: 1 week ago