Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (9k points)
What is Procedure in PL SQL?

1 Answer

0 votes
by (45.3k points)

PL SQL is a procedural extension of SQL (Structured Query Language). Procedure or function in PL SQL is a block of code in PL SQL that allows you to perform multiple specific tasks. It consists of a header and a body. The header in PL/SQL contains that procedure’s name along with the variables or parameters that are passed to the procedure. The body, on the other hand, consists of the execution section, the exception section, and the declaration section which is similar to a regular PL/SQL block.

There are three methods of passing a parameter in procedure which include:

  • IN parameter: The procedure or the function can refer to this parameter. You cannot overwrite its value by the procedure.
  • OUT parameter: The procedure cannot refer to this parameter. However, you can use a procedure to overwrite its value.
  • INOUT parameter: This parameter can be referenced by a procedure and you can also overwrite the value of the parameter with the help of the procedure.

To learn more about SQL and its procedural extension PL/SQL, sign up for SQL Training.

You should also check out this video on SQL and PL/SQL:

Related questions

0 votes
1 answer
asked Jan 29, 2020 in SQL by anmolj (9k points)
0 votes
1 answer
asked Dec 10, 2020 in SQL by dev_sk2311 (45k points)
0 votes
1 answer
asked Oct 19, 2020 in SQL by dev_sk2311 (45k points)
0 votes
1 answer
asked Jan 29, 2020 in SQL by anmolj (9k points)
0 votes
1 answer
asked Jan 29, 2020 in SQL by anmolj (9k points)

Browse Categories

...