1 create a pl sql block to retrieve the name of each department from the dept table 5346495

1. Create a PL/SQL block to retrieve the name of each department from the DEPT table and print each department name to the output window, incorporating a PL/SQL table a. Declare a PL/SQL table, my_dept_table to temporarily store the name of departments. b. Using a loop retrieve the name of all departments currently in the DEPT table and store them in the my_dept_table. Each department number is a multiple of 10. c. Using another loop, retrieve the department names from the PL/SQL table and print them to the screen, using DBMS_OUTPUT.PUT_LINE. 2. Using the DEPT table and an explicit cursor write a block to find the location of all departments. Your output should look like this: Results Explain Describe Saved SQL History Department Number Location 10 NEW YORK 20 DALLAS 30 CHICAGO 40 BOSTON Statement processed. 3. Using the ORD table create a stored function called custord that will use a customer id (CUSTID) that will return the sum of the specified customer id TOTAL field. When your function has been stored run the following SQL: begin dbms_output.put_line('customer 102 total is ' || custord(102)); end; Your output should look like: Results Explain Describe Saved SQL History customer 102 total is 27775.5 Statement processed. 0.01 seconds 4. Write a PL/SQL block to select the name of the employee with a given salary value. You will be using the MESSAGES table that was created for a previous assignment. a. Declare a variable of type emp.sal as a salary variable and assign the value 800 to that variable. b. If the salary entered returns more than one row, handle the exception with an appropriate exception handler and insert into the MESSAGES table the message

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now