Database Tutorial

Course Tutorial Site

Site Admin

Description

without comments

Lab #10: Outer Join Select

Learn how to write SELECT statements with a query of data derived by an outer join against an external table and internally managed tables. Reinforce how you embed the queries to use sequence values as a pseudo column before inserting the results in INSERT statements. There are three queries that you must develop and insert their data sequentially. The sequential nature of the queries resolves around the independence of the first query, and the dependencies of the second and third queries. In other words, you must insert the records into the rental table before you can insert rows in the rental_item table, and you must insert records into the rental and rental_item tables before you can insert records into the transaction table.

Lab Description

You learn how to import a flat-file through an externals.

The lab has three parts, which you find after clicking on the Lab Instructions link. The steps are:

  • Step 1: Create a SELECT statement that uses the DISTINCT operator; and then use it as a subquery to an INSERT statement into the rental table.
  • Step 2: Create a SELECT statement; and then use it as a subquery to an INSERT statement into the rental_item table.
  • Step 3: Create a SELECT statement; and then use it as a subquery to an INSERT statement into the transaction table.

Written by michaelmclaughlin

August 13th, 2018 at 11:41 am

Posted in