SQLMentor // learn pl/sql

Learn Oracle PL/SQL — Procedural Programming for the Database

PL/SQL is Oracle's procedural extension to SQL — the language behind every stored procedure, function, package, and trigger in an Oracle Database. This free interactive tutorial covers everything you need to write production-grade PL/SQL and to pass the Oracle 1Z0-149 certification.

Each topic uses small, focused examples on the Oracle HR schema, followed by practice exercises and a quick quiz. The track runs from PL/SQL Basics through to packages, exception handling, bulk operations, and dynamic SQL — with detours into common interview topics.

PL/SQL remains one of the most in-demand database skills for roles in banking, insurance, telecom and government, where decades of business logic live in packages and stored procedures. The track is aimed at SQL developers moving into procedural code, support engineers who maintain existing PL/SQL, and candidates preparing for PL/SQL developer interviews.

What you'll learn in this PL/SQL tutorial

  • PL/SQL block structure, variables, and control flow
  • Cursors — implicit, explicit, REF cursors, and FOR loops
  • Procedures, functions, and packages
  • Triggers — DML, INSTEAD OF, compound, and DDL
  • Exception handling and the PRAGMA EXCEPTION_INIT pattern
  • Bulk collect, FORALL, and dynamic SQL with EXECUTE IMMEDIATE

Common use cases for PL/SQL

Business logic inside the database

Stored procedures, functions and packages keep validation, calculations and workflows next to the data — a single round trip instead of shuttling rows to an application server. Most large Oracle estates have thousands of PL/SQL objects in production.

High-volume batch processing

BULK COLLECT and FORALL process millions of rows per run with a fraction of the context switches of row-by-row code — the standard pattern for nightly ETL, billing runs and data migrations.

Auditing, integrity and automation with triggers

DML and compound triggers enforce audit trails and complex integrity rules that plain constraints can't express, firing automatically no matter which application touches the table.

Frequently asked questions about PL/SQL

What is the difference between SQL and PL/SQL?
SQL is a declarative query language — each statement is a single instruction. PL/SQL wraps SQL in a procedural language with variables, loops, conditions and exception handling, so you can build multi-step programs (procedures, functions, packages, triggers) that run inside Oracle Database.
Is PL/SQL still worth learning in 2026?
Yes. Enormous amounts of production business logic in banking, insurance, telecom and ERP systems are written in PL/SQL, and organisations pay well for people who can maintain, tune and modernise it. It is a lower-competition, high-value niche compared to general-purpose languages.
Do I need to know SQL before starting PL/SQL?
You should be comfortable with SELECT, joins and basic DML first, because PL/SQL embeds SQL statements everywhere. If you're new to SQL, start with the Oracle SQL track on SQLMentor and return here after the Core SQL section.
Does this tutorial prepare me for the 1Z0-149 certification?
Yes. The track covers the 1Z0-149 exam domains — block structure, cursors, exception handling, procedures, functions, packages, triggers and dynamic SQL — and SQLMentor provides free 65-question timed 1Z0-149 practice exams with explanations.
Loading content