Practice 9

Practice 9 - Note the types and names of the constraints....

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ASSIGNMENT FOR AST AND ANT JUNE 2004(3rd August 2004) Submission date:4th August 2004 Practice 9 1. Add a table level PRIMARY KEY constraint to the EMPLOYEE table using the ID column. The constraint should be enabled at creation. 2. Create a PRIMARY KEY constraint on the DEPARTMENT table using the ID column. The constraint should be enabled at creation. 3. Add a foreign key reference on the EMPLOYEE table that will ensure that the employee is not assigned to a nonexistent department. 4. Confirm that the constraints were added by querying USER_CONSTRAINTS.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Note the types and names of the constraints. Save your statement text in a file called p11q4.sql 5. Display the object names and types from the USER_OBJECTS data dictionary view EMPLOYEE and DEPARTMENT tables. You may want to format the columns for readability. Notice that the new tables and a new index were created. 6. Modify the EMPLOYEE table. Add a SALARY column of NUMBER data type, precision 7....
View Full Document

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Ask a homework question - tutors are online