PL/SQL Tutorial

If you are looking for a complete PL/SQL tutorial, you are at the right place. This plsqltutorial.com website provides you with a comprehensive PL/SQL tutorial that helps you learn PL/SQL quickly from scratch.

What is PL/SQL?

PL/SQL Tutorial

PL/SQL stands for Procedural Language extensions to the Structured Query Language (SQL). SQL is a powerful language for both querying and updating data in relational databases.

Oracle created PL/SQL that extends some limitations of SQL to provide a more comprehensive solution for building mission-critical applications running on the Oracle database. Getting to know more information about PL/SQL language.

Before getting started, we highly recommend setting up an Oracle database in your system to help you practice and learn PL/SQL effectively.

Basic PL/SQL Tutorial

We assume that you have the fundamental knowledge of databases and SQL to start our PL/SQL tutorial. If this is not the case, you need to follow the basic SQL tutorial to have a good start.

This section is targeted as a good starting point for those who are new to PL/SQL. However, if you are very familiar with the language and also want to glance through these tutorials as a refresher, you may even find something useful that you haven’t seen before.

  • PL/SQL Block Structure – introduces you to PL/SQL block structure and shows you how to develop the first running PL/SQL program.
  • PL/SQL Variables – shows you how to work with PL/SQL variables including declaring, naming, and assigning variables.
  • PL/SQL Function – explains what PL/SQL functions are and shows you how to create PL/SQL functions.
  • PL/SQL Procedure – discusses PL/SQL procedures and shows you how to create PL/SQL procedures.
  • PL/SQL Nested Block – explains what a PL/SQL nested block is and how to apply it in PL/SQL programming.
  • PL/SQL IF Statement – introduces you to various forms of the PL/SQL IF statement including IF-THEN, IF-THEN-ELSE and IF-THEN-ELSIF statement.
  • PL/SQL CASE Statement – shows you how to use PL/SQL CASE statement and PL/SQL searched CASE statement.
  • PL/SQL LOOP Statement – guides you on how to use PL/SQL LOOP statement to execute a block of code repeatedly.
  • PL/SQL WHILE Loop Statement – executes a sequence of statements with a condition that is checked at the beginning of each iteration with the  WHILE loop statement.
  • PL/SQL FOR Loop Statement – shows you how to execute a sequence of statements in a fixed number of times with FOR loop statement.
  • PL/SQL Exception Handling – teaches you how to handle exceptions properly in PL/SQL as well as shows you how to define your own exception and raise it in your code.
  • PL/SQL Record – explains the PL/SQL record and shows you how to use records to manage your data more effectively.
  • PL/SQL Cursor – covers PL/SQL cursor concept and walks you through how to use a cursor to loop through a set of rows and process each row individually.
  • PL/SQL Packages – shows you how to create a PL/SQL package that is a group of related functions, procedures, types, etc.