Question: Create a PL/SQL block that selects the maximum department ID in the departments table and stores it in the v_max_deptno variable. Display the maximum
Create a PL/SQL block that selects the maximum department ID in the departments table and stores it in the v_max_deptno variable. Display the maximum department ID. a. Declare a variable, v_max_deptno, of type NUMBER in the declarative section. b. Start the executable section with the BEGIN keyword and include a SELECT statement to retrieve the maximum department_id from the departments table. c. Display v_max_deptno and end the executable block. d. Execute and save your script as lab_04_01_soln.sql. Sample output is as follows: anonymous block completed The maximum department_id is: 270
Step by Step Solution
3.27 Rating (139 Votes )
There are 3 Steps involved in it
Heres a PLSQL block that accomplishes the task you descr... View full answer
Get step-by-step solutions from verified subject matter experts
