DEV Community

Cover image for Introduction to PL/SQL
ishrat
ishrat

Posted on

Introduction to PL/SQL

PL/SQL is a block-structured language that enables developers to combine the power of SQL with procedural statements.
All block statements are passed to the Oracle engine all at once, increasing processing speed and decreasing traffic.

Basics of PL/SQL

  • PL/SQL stands for Procedural Language extensions to the Structured Query Language (SQL).
  • PL/SQL is a combination of SQL along with the procedural features of programming languages.
  • Oracle uses a PL/SQL engine to process the PL/SQL statements.
  • PL/SQL is a procedural language featuring conditions, loops, constants, variables, procedures, functions, triggers, and user-defined types.

Cons of SQL:

  • SQL doesn’t provide the programmers with a technique of condition checking, looping and branching.
  • SQL statements are passed to Oracle engine one at a time which - - increases traffic and decreases speed. SQL has no facility for error checking during the manipulation of data.

Features of PL/SQL:

  • PL/SQL is a procedural language that provides decision-making and iteration functionality, among other features of procedural programming languages. Execute several queries in one block using a single command.

  • PL/SQL units such as procedures, functions, packages, triggers, and types can be created and stored in the database for application reuse.

  • PL/SQL offers a useful feature to handle exceptions that may occur within a PL/SQL block. This feature is called an exception-handling block. Applications that are written in PL/SQL can be easily moved to different computer hardware or operating systems that support Oracle. Additionally, PL/SQL provides comprehensive error-checking capabilities, ensuring that errors are caught and handled effectively.

Differences between SQL and PL/SQL:

difference

Top comments (0)