Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose you have two tables in a university database system: enrolled _ students which contains the IDs of all currently enrolled students, and graduated _

Suppose you have two tables in a university database system: enrolled_students which contains the IDs of all currently enrolled students, and graduated_students which contains the IDs of all students who have graduated. You want to create a list of all unique student IDs, whether they are currently enrolled or have already graduated.
Which of the following SQL queries correctly combines the student IDs from both tables without any duplicates?
Group of answer choices
SELECT student_id FROM enrolled_students UNION SELECT student_id FROM graduated_students;
SELECT student_id FROM enrolled_students UNION ALL SELECT student_id FROM graduated_students;
SELECT student_id FROM enrolled_students INTERSECT SELECT student_id FROM graduated_students;
SELECT student_id FROM enrolled_students EXCEPT SELECT student_id FROM graduated_students;

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions

Question

1. How might volunteering help the employer and the employee?

Answered: 1 week ago

Question

Did the team members feel that their work mattered

Answered: 1 week ago

Question

3. What may be the goal of the team?

Answered: 1 week ago