From the course: Oracle Database 12c: Advanced SQL

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Introduction to PL/SQL functions

Introduction to PL/SQL functions - Oracle Database Tutorial

From the course: Oracle Database 12c: Advanced SQL

Start my 1-month free trial

Introduction to PL/SQL functions

- [Instructor] While PL/SQL procedures are used to perform database actions, PL/SQL functions are usually utilized to perform a calculation and return a result to the user. PL/SQL functions are very similar in structure to PL/SQL procedures, and are created using the create function, or in case you wish to override an existing function, the create or replace function command followed by the schema dot and functioning. PL/SQL functions can both take in arguments or parameters, and also return back values. PL/SQL functions are also created and stored in the database similarly to PL/SQL procedures. However, PL/SQL functions are invoked or executed differently. PL/SQL functions are executed as part of a sequel statement. We will see a demo of exactly how to create and execute a PL/SQL function later in our chapter. As you can see, a PL/SQL function is invoked from within a sequel statement on the employees' table.

Contents