PLSQL

Home ยป PLSQL

PL/SQL Procedure Example

A procedure is similar to a PL/SQL block, but it has a name and is stored in the database permanently. The schema object is the main way that business logic is implemented on the server side. By breaking up complex logic into simple routines, a procedure helps a modular programming method. The most important things …

PL/SQL Procedure Example Read More »

Exception Handling in PL/SQL

In this tutorial, you will learn about exceptions in PL/SQL and how to write code to handle them. One of the most crucial stages of developing a database application is handling exceptions. Unhandled exceptions pose a threat to application availability, disrupt business operations, and annoy users. In PL/SQL, an exception can be either predefined by …

Exception Handling in PL/SQL Read More »

PL/SQL Cursor FOR LOOP Examples

In PL/SQL, FOR loop allows for easy iteration over a cursor object's entire set of records. A CURSOR FOR loop is a FOR loop that initiates the opening of a cursor. The CURSOR FOR loop eliminates the need for the programmer to explicitly define the cursor's OPEN, FETCH, and CLOSE operations, thereby saving time. Cursor …

PL/SQL Cursor FOR LOOP Examples Read More »

What is Cursor in PL/SQL?

In this tutorial, you will learn, what is cursor in PL/SQL and how it works. One of the most important aspects of database programming is writing SQL in PL/SQL. All SQL statements contained within a PL/SQL block are processed as cursors. A cursor is a private memory area used for SQL statement processing that is …

What is Cursor in PL/SQL? Read More »

How to Get Table Definition in Oracle?

Use dbms_metadata.get_ddl() function to get the table definition in Oracle. Below is an example: DBMS_METADATA.GET_DDL() Example The following SQL query will get the table definition for the EMP table in the current schema of Oracle Database: select DBMS_METADATA.GET_DDL('TABLE','EMP') from DUAL; Output: CREATE TABLE "FJ22CDVLZSYLNS"."EMP" ( "EMPNO" NUMBER(4, 0) NOT NULL ENABLE, "ENAME" VARCHAR2(10), "JOB" VARCHAR2(9), …

How to Get Table Definition in Oracle? Read More »

PL/SQL Online MCQ Quiz

Below is the PL/SQL Online MCQ Quiz. It shows the basic ten multiple-choice questions of PL/SQL programming and lets you choose the answer on a single page. And once you click on the Finish button at the end, it will display the results with the correct and wrong answers. So let's start the quiz: