Question: Database Adminitration - Oracle Database Create a SEQUENCE and a TRIGGER to help automate the insertion of records into HR.DEPARTMENTS -Set echo on -SET SERVEROUT

Database Adminitration - Oracle Database

Create a SEQUENCE and a TRIGGER to help automate the insertion of records into HR.DEPARTMENTS

-Set echo on

-SET SERVEROUT ON

-Set up a spool file to receive your output for submission. I would suggest c:\cs423\wa4spool.txt

-Drop and create a SEQUENCE named HR.NEWDEPT_SEQ starting at 280 and incrementing by 10

-Create or replace a BEFORE INSERT trigger named HR.NEWDEPT_TRG to use HR.NEWDEPT_SEQ for the DEPARTMENT_ID

-Add a new Department to HR.DEPARTMENTS

-Print the new record

-(Be sure to ROLLBACK your transaction)

-Close the spool file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!