LAB 3:    Using SQL

1.  Adding Referential Constraints

Use the ALTER TABLE command to:

The view:  FOREIGN_KEYS contains data on all foreign keys you have created (this view is created from the user_constraints and user_cons_columns tables).  Enter the following commands to show the details of the foreign keys you have created:

    select * from foreign_keys where table_name = 'PORTFOLIO';
    select * from foreign_keys where table_name = 'HOLDING';

2.  Using the CHECK clause to specify validation rules:

Use the ALTER TABLE command to add a check clause on the SALARY column in the Manager table to ensure the salary value is at least $40,000.

Attempt to insert the following row into the Manager table:  M4, Granger, 35000.

3.  Using the SELECT statement:

Code select statements for the following queries:

4.  Creating views:

Create the following views: