InterviewSolution
Saved Bookmarks
| 1. |
What does a basic loop do in PL/SQL? |
|
Answer» A subprogram in PL/SQL is EITHER a procedure or a function that can be invoked repeatedly. Each subprogram has a name and a LIST of parameters. It performs a specific task and the following two subprograms EXIST in PL/SQL:
The following are the parts of a subprogram:
It contains declarations of cursors, constants, variables, exceptions, etc.
Had statements that perform actions.
The code that handles run-time errors. 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. |
|