Category PLSQL

PL/SQL (Procedural Language for SQL) is Oracle’s proprietary extension to standard SQL. It combines the data manipulation power of SQL with the procedural capabilities of a programming language. PL/SQL allows developers to write complex database-centric applications by incorporating variables, conditions, loops, error handling, and modular programming constructs like procedures and functions. This language is tightly integrated with Oracle databases, enabling efficient data processing and transaction management.

How To Truncate Table In Oracle Procedure?

How To Truncate Table In Oracle Procedure?

In Oracle, TRUNCATE command is a DDL statement, so you can not execute it directly in Oracle Procedure. To execute DDL commands in Oracle procedure, use EXECUTE IMMEDIATE statement. The below is an example of truncating a table in Oracle procedure…

How to Call Oracle Function in Python?

How to Call Oracle Function in Python?

In this tutorial, you will learn how to call Oracle function in Python. I am giving an example by using cx_Oracle library callfunc function in the Python program. The following are the syntax details and the sample programs. CX_Oracle callfunc…

How to Check If File Exists in PL/SQL?

How to Check If File Exists in PL/SQL?

The following is a stored function example to check if a file exists in PL PL/SQL Function Example To Check If a File Exists The below function takes two parameters, one is for Oracle directory object name and the second…

How to Get File From BLOB in Oracle?

How to Get File From BLOB in Oracle?

In this tutorial, you will learn how to get a file from BLOB column in Oracle. To give an example, I have created a table EXT_FILES in Oracle and following is the structure of the table. CREATE TABLE EXT_FILES ( FILE_NAME…

Oracle Before Insert OR Update Trigger Example

The following is an Oracle BEFORE INSERT OR UPDATE Trigger example to perform validations while inserting or updating the records in EMP table. Oracle BEFORE INSERT OR UPDATE Trigger Example The below trigger will do the following two checks on…

Oracle Trigger WHEN Clause Example

In this article, you will learn how to use WHEN clause in Oracle trigger to make the trigger fire on the specified condition. Below is an example. You can test this trigger example by creating the following table and trigger…

Table Type in Oracle Stored Procedure Example

The following is an example of Oracle stored procedure, in which table type collection is used to process the data. Process Data Using Table Type in Oracle Stored Procedure Example Create the following tables and insert the data to test…