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
Get step-by-step solutions from verified subject matter experts
