From the course: Oracle Database 19c: PL/SQL

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Creating procedures

Creating procedures

- [Instructor] Creating stored procedures is a companion to stored functions but has many more uses in modular database code development beyond calling it from a select statement. A database procedure is a sequence of SQL and PL/SQL statements stored by name in the database's data dictionary that you can call again later. It can be anonymous, meaning it doesn't get stored permanently in the database but can be used once or many times if you store it in a text document. You run it when you need to and can use all the PL/SQL constructs. A procedure can have zero or several arguments but it does not return values. Finally, it can be stored by itself in the data dictionary or stored along with many other procedures and functions in a package, a convenient grouping of procedures, functions, and associated variables. What, a procedure has no return value? Because it's not a function, it's not part of the SQL language, so you can't call it from a select statement like the square root…

Contents