Write PL/SQL or T-SQL procedures to accomplish the following tasks:
a. Obtain the name and credit limit of the customer whose number currently is stored in
I_CUSTOMER_NUM. Place these values in the variables I_CUSTOMER_NAME and
I_CREDIT_LIMIT, respectively. Output the contents of I_CUSTOMER_NAME and
I_CREDIT_LIMIT.
b. Obtain the order date, customer number, and name for the order whose number currently
is stored in I_ORDER_NUM. Place these values in the variables I_ORDER_DATE,
I_CUSTOMER_NUM and I_CUSTOMER_NAME, respectively. Output the contents of
I_ORDER_DATE, I_CUSTOMER_NUM, and I_CUSTOMER_NAME.
c. Add a row to the ORDERS table.
d. Change the date of the order whose number is stored in I_ORDER_NUM to the date
currently found in I_ORDER_DATE.
e. Delete the order whose number is stored in I_ORDER_NUM.
Here are all the tables that will help you answer these questions.
REP TABLE
REP_NUM, LAST_NAME, FIRST_NAME, STREET, CITY, STATE, ZIP, COMMISSION, RATE
CUSTOMER TABLE
CUSTOMER_NUM, CUSTOMER_NAME, STREET, CITY, STATE, ZIP, BALANCE, CREDIT_LIMIT, REP_NUM
ORDERS TABLE
ORDER_NUM, ORDER_DATE, CUSTOMER_NUM
ORDER_LINE TABLE
ORDER_NUM, PART_NUM, NUM_ORDERED, QUOTED_PRICE
PART TABLE
PART_NUM, DESCRIPTION, ON_HAND, CLASS, WAREHOUSE, PRICE