Oracle Database 18c  PL/SQL

Oracle Database 18c PL/SQL

PL/SQL is a procedural language designed specifically to embrace SQL statements within its syntax. PL/SQL program units are compiled by the Oracle Database server and stored inside the database. And at run-time, both PL/SQL and SQL run within the same server process, bringing optimal efficiency. PL/SQL automatically inherits the robustness, security, and portability of the Oracle Database.

Why Use PL/SQL?

An application that uses Oracle Database is worthless unless only correct and complete data is persisted. The time-honored way to ensure this is to expose the database only via an interface that hides the implementation details -- the tables and the SQL statements that operate on these. This approach is generally called the thick database paradigm, because PL/SQL subprograms inside the database issue the SQL statements from code that implements the surrounding business logic; and because the data can be changed and viewed only through a PL/SQL interface.  Bryn Llewellyn, Distinguished Product Manager for PL/SQL and Edition-based Redefinition, explains the thick database approach in detail in his "Why use PL/SQL?" whitepaper.

Join the PL/SQL Challenge community and try out these PL/SQL quizzes, learn as you go. You can choose to play competitively, ranking yourself against hundreds of other developers from around the world, or play simply to depend your experience.
Read the Freedom, Order, and PL/SQL Optimization whitepaper on PL/SQL's powerful optimizer, the go-to document for any questions regarding the behavior of PL/SQL programs compiled at optimize levels higher than 1.

Getting Started With PL/SQL

Steven Feuerstein published a series of "PL/SQL 101" articles in Oracle Magazine to help developers new to PL/SQL quickly come up to speed on the language. We offer links to those (and other) articles below.

Building and Managing PL/SQL Program Units

Building with Blocks   PL/SQL is a block-structured language; familiarity with blocks is critical to writing good code.

Controlling the Flow of Execution  Conditional branching and iterative processing in PL/SQL 

Wrap Your Code in a Neat Package   Packages are the fundamental building blocks of any high quality PL/SQL-based application

Picking Your Packages  Concepts and benefits of PL/SQL packages

Error Management  An exploration of error management features in PL/SQL 

The Data Dictionary: Make Views Work for You  Use several key data dictionary views to analyze and manage your code

PL/SQL Datatypes

Working with Strings in PL/SQL  PL/SQL offers several different string datatypes for use in your applications

Working with Numbers in PL/SQL  Learn about and how to use the different numeric types in PL/SQL.  

Working with Dates in PL/SQL  Dates are a relatively complex scalar datatype, in both SQL and PL/SQL

  Working with Records  A very common and useful composite type, PL/SQL's analogue to a table's row

Working with Collections PL/SQL's implementation of arrays plays a role in almost every key performance feature of PL/SQL

SQL in PL/SQL

Working with Cursors  PL/SQL cursors make it easy for you to manipulate the contents of database tables

Bulk Processing with BULK COLLECT and FORALL   The most important performance feature in PL/SQL related to executing SQL

Practically Perfect PL/SQL with Steven Feuerstein

Practically Perfect PL/SQL (P3) offers videos on PL/SQL by Steven Feuerstein, Oracle Developer Advocate for PL/SQL and author of Oracle PL/SQL Programming.

Getting Rid of Hard-Coding in PL/SQL

This first playlist of P3 explores the various forms of hard-coding that can appear in PL/SQL, and how best to get rid of them.