0% found this document useful (0 votes)
64 views2 pages

Activity 6.1 Module9 Union Intersect Minus

This document provides instructions for an exercise using union, intersect, and minus functions in Oracle SQL. Participants will query tables using SQL in Oracle SQL*Plus. The instructions explain how to log in and save queries and results to a file. The exercise contains 8 queries using union, intersect, and minus to combine and compare records between tables and add new columns. Queries include displaying names from instructor and student tables with and without duplicates, common zip codes between tables, courses with no student enrollment, and more.

Uploaded by

Akshay Mehta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views2 pages

Activity 6.1 Module9 Union Intersect Minus

This document provides instructions for an exercise using union, intersect, and minus functions in Oracle SQL. Participants will query tables using SQL in Oracle SQL*Plus. The instructions explain how to log in and save queries and results to a file. The exercise contains 8 queries using union, intersect, and minus to combine and compare records between tables and add new columns. Queries include displaying names from instructor and student tables with and without duplicates, common zip codes between tables, courses with no student enrollment, and more.

Uploaded by

Akshay Mehta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Introduction To RDBMS and SQL

Module 9: Union-Intersect-Minus

Module 9 Activity 6.1 Union/Intersect/Minus


functions against the table
Estimated Completion Time: 45 minutes

Overview
This exercise will require participants to query on the tables in Oracle SQL PLUS using the
SQL language.

Instructions
Querying records in tables should be done in Oracle SQL PLUS.
1. In order to proceed with querying records in the tables, login using your user name
created in Exercise 01 and then proceed to use the SET operators.

Hints
1. Ensure the following while creating the queries on the table:

Execute the query in SQL PLUS.

After each successful command save the command in the file.

IDCGRF002
2009 Accenture. All Rights Reserved.

To save the file - C:\RDBMS\Day3\UnIntMin.sql append.

264257744.doc.doc

Introduction To RDBMS and SQL

Module 9: Union-Intersect-Minus

Union/Intersect and Minus

1) Display the first name and last name of both the instructor and student in one result set.
2) Modify the above query to display duplicate names also.
3) Modify the above query to add a column Name to display text as 'Instructor' or 'Student' in each row.
4) Display the instructor id not having any section.
5) Display the course no having section.
6) Display a list of courses and section having no students enrolled. Add a new column called as status
that displays text as 'No Student Enrolled'.
7) Display all the zip codes that are present in both the instructor and the student tables.
8) Display the student ids who have enrolled.

IDCGRF002
2009 Accenture. All Rights Reserved.

264257744.doc.doc

You might also like