PL/SQL is a specific database programming language owned and developed by Oracle. It is an extension of regular SQL and its main difference is found in its syntax. PL/SQl is very effective in working with Oracle database platforms because of its design. Functions and procedures run smoothly with the Oracle database because the language was specifically designed to be run on this type of database.
The purpose of functions is to return a value or a set of values, which the user defines. For example, a user may want to isolate certain records, which all share a similar attribute. For example, last name. A database user may want to find all of the records that belong to a certain person in the database. There are many ways a database programmer can do this, functions being one of them.
A large variety of user-written functions exist to perform different tasks. Loops may also be incorporated into functions, which provide programmers with the ability to make more complex functions. The step by step nature of the user written function gives the programmer the flexibility to create a function that performs its exact task.