Important Points About Procedures in SQL
- A procedure in PL/SQL is a subprogram that can take parameters and be called to perform a specific action.
- Procedures are executed just like SQL statements.
- Procedures have two parts the specification (spec) and the body. The spec begins with the
PROCEDURE
keyword and ends with the procedure name and optional parameter list. The body begins withIS
(orAS
) and ends withEND
followed by an optional procedure name- They enhance performance by reducing network traffic between the application and database.
Procedures in PL/SQL
A Procedure in PL/SQL is a subprogram containing a series of declarative SQL statements that can take parameters and be called to perform a specific action.
These PL/SQL procedures are stored in the database catalog. A procedure can be thought of as a function or a method. They can be invoked through triggers, other procedures, or applications on Java, PHP, etc.
All the statements of a block are passed to the Oracle engine all at once which increases processing speed and decreases the traffic.
Here, we will learn about Procedures in PL/SQL with examples and learn how to create, modify, and delete procedures. It is a very important concept of database and you might face several PL/SQL Procedure interview questions during the job hunt, so understand the concept carefully.
Contact Us