PL/SQL Procedure

A procedure is a named PL/SQL block which is stored in the database and can be invoked by name. An Oracle PL/SQL procedure has a header and a body. The header consists of the keyword PROCEDURE, followed by the procedure name, followed by a list of parameters in parentheses. The body of the procedure consists…(Continue Reading)

PL/SQL Function

Oracle PL/SQL function is a subroutine available to applications that access an Oracle database. Functions provide modularity and code reusability. A PL/SQL function is a block of PL/SQL code that can be called by another block of code or from a SQL statement. It returns a single value, which can be a scalar value or…(Continue Reading)

PL/SQL %ROWTYPE Attribute

Oracle PL/SQL %ROWTYPE is a very useful attribute that can be used to fetch rows from a table and store the information in a record. This is especially helpful when you need to loop through a result set and process each row individually. The PL/SQL %ROWTYPE attribute provides a record type that represents a row…(Continue Reading)

PL/SQL %TYPE Attribute

Oracle PL/SQL provides a special data type called the %TYPE data type. The %TYPE data type allows you to declare a variable that is associated with a column in a database table. The %TYPE attribute is a powerful feature designed to enhance the readability, maintainability, and flexibility of code by associating variables with database columns…(Continue Reading)

PL/SQL Variables

What is a variable? A PL/SQL variable is a placeholder for a value. This value can be a number, date, or text string. You can use variables in your Oracle PL/SQL programs to store values temporarily. Syntax To create a variable, you use the following syntax: variable_name datatype [NOT NULL] [:= | DEFAULT initial_value]; You…(Continue Reading)