Tuesday , April 23 2024

Oracle PL/SQL Functions

This article contains information about PL/SQL Functions, and examples.

What is Function in Oracle?

Oracle PL/SQL functions structure are structures that can store commands under a name in the database and can be run again if needed as in the procedure structure.

What is the Difference Between Function and Stored procedure in Oracle?

The difference of the functions from the procedures is that they have to return values.

The keywords to be used when creating the function are as follows.

An example of creating a function with Oracle PL / SQL is as follows.

We can run the functions as below;

SYS.all_objects table can be used to get information about the created functions.

The following command is used to delete a function.

The reason for using the functions is to perform operations where the functions in Oracle are insufficient.

PL SQL Function Example with parameters

The function that converts the first letter in a text to uppercase can be written as follows.

You can run the function as below;

In addition, functions can be used for calculating a continuously used process (such as VAT calculation).

You can find more detailed information about below topics in the below link.

PL/SQL Tutorial

You will find below topics in this article.

  1. What is PL/SQL
  2. Oracle PL/SQL Data Types and Variables and Literals
  3. Oracle PL/SQL Operators
  4. Oracle PL/SQL Conditional Statements
  5. Oracle PL/SQL Loops
  6. Oracle PL/SQL Procedures and Procedure Parameters
  7. Oracle PL/SQL Functions
  8. Oracle PL/SQL Cursor
  9. Oracle PL/SQL Records
  10. Oracle PL/SQL Exception
  11. Oracle PL/SQL Trigger
  12. Oracle PL/SQL Packages
  13. Oracle PL/SQL Collections

You can find more information about functions at docs.oracle.com

Loading

About Yusuf SEZER

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories