Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We are working on Subqueries vs Joins. Please assist with a,b,c,and d. After I create the table Secretary. Thank you. Create a table called Secretary

We are working on Subqueries vs Joins. Please assist with a,b,c,and d. After I create the table Secretary. Thank you.

Create a table called Secretary with the attributes dcode CHAR(4) (for department code) and name VARCHAR2(20) (for the secretary name). Populate the table as follows:image text in transcribed

a. Create a query that lists the names of departments that have secretaries (use IN and the Secretary table in a subquery with the Department_to_major table in the outer query). Save this query as q77a.

b.. Create a query that lists the names of departments that do not have secretaries (use NOT.. IN). Save this query as q77b.

c. Add one more row to the Secretary table that contains (This could be a situation in which we have hired Brenda but have not yet assigned her to a department.)

d. Recall q77a and re-run it.

e. Recall q77b and re-run it.

Secretary dCode ACCT cosc ENGL name Sally Chris Maria 8

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_2

Step: 3

blur-text-image_3

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions