What is PL/SQL?

PL/SQL is Oracle Corporation's procedural language extension for SQL and the Oracle relational database.

PL/SQL (Procedural Language/SQL) is a combination of SQL along with the procedural features of programming languages. It was developed by Oracle Corporation in the early 90’s to enhance the capabilities of SQL.\n\nPL/SQL includes programming language features such as variables, constants, loops, conditions, and exception handling. It allows you to write complex queries and procedural logic that can be stored and executed on the database server, which can significantly improve performance by reducing network traffic.

Code Example

DECLARE
  message  VARCHAR2(20):= 'Hello, World!';
BEGIN
  DBMS_OUTPUT.PUT_LINE(message);
END;
/