InterviewSolution
Saved Bookmarks
| 1. |
How to close a CURSOR in PL/SQL? |
|
Answer» PL/SQL Block Structures and it executes as a whole block. The block structure can be understood with the concept of subprograms in PL/SQL. A block structure has the following PARTS:
It contains declarations of cursors, CONSTANTS, VARIABLES, exceptions, etc. Variables are declared here.
Had statements that perform actions. It must have atleast one statement.
The code that handles run-time errors. It use EXCEPTION keyword. The following is the syntax to create a subprogram (procedure): CREATE [OR REPLACE] PROCEDURE name_of_procedure [(parameter_name [IN | OUT | IN OUT] type [, ...])] {IS | AS} BEGIN < procedure_body > END name_of_procedure;Here,
Here is an example of a subprogram (procedure): CREATE OR REPLACE PROCEDURE one AS BEGIN dbms_output.put_line('Welcome!'); END; /The output displays the procedure created successfully: Procedure created. |
|