Question: 5. Create a stored procedure named Add_Shipment_Method that lets a user insert a new shipment method to the shipment method table in the database. This

5. Create a stored procedure named Add_Shipment_Method that lets a user insert a new shipment method to the shipment method table in the database. This procedure should have two parameters, one for each of the two columns in this table. Then, include the following test statements after the procedure in your submitted script file. CALL Add_Shipment_Method (12, Sea); Select * From Shipment_Method;

-- Use an anonymous PL/SQL script to -- drop all tables and sequences in the current schema and -- suppress any error messages that may displayed -- if these objects don't exist BEGIN EXECUTE IMMEDIATE 'DROP TABLE Order_Lines'; EXECUTE IMMEDIATE 'DROP TABLE Products'; EXECUTE IMMEDIATE 'DROP TABLE Orders'; EXECUTE IMMEDIATE 'DROP TABLE Payment_method'; EXECUTE IMMEDIATE 'DROP TABLE Shipment_method'; EXECUTE IMMEDIATE 'DROP TABLE CATEGORIES'; EXECUTE IMMEDIATE 'DROP TABLE Customers'; EXECUTE IMMEDIATE 'DROP TABLE Employees'; EXECUTE IMMEDIATE 'DROP TABLE Jobs'; EXECUTE IMMEDIATE 'DROP TABLE Departments'; EXECUTE IMMEDIATE 'DROP TABLE Product_Inventory'; EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE(''); END; /

CREATE TABLE DEPARTMENTS ( DEPARTMENT_ID NUMBER(2) NOT NULL, DEPARTMENT_NAME VARCHAR2(20) NULL, CITY VARCHAR2(30) NULL, STATE CHAR(2) NULL );

ALTER TABLE DEPARTMENTS ADD CONSTRAINT Departments_PK PRIMARY KEY (DEPARTMENT_ID);

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!