Science Fair Project Encyclopedia
Since SQL functions as a declarative language, and unlike some functional programming languages the standard does not require implementations to convert tail calls to jumps or readily provide "first row" and "rest of table" accessors, SQL cannot easily perform some constructs such as loops. PL/SQL, however, as a Turing-complete procedural language which fills in these gaps, allows Oracle database developers to interface with the underlying relational database in an imperative manner. SQL statements can make explicit in-line calls to PL/SQL functions, or can cause PL/SQL triggers to fire upon pre-defined DML events.
PL/SQL functions analogously to the embedded procedural languages for other relational databases. Sybase and its derivative Microsoft SQL Server have Transact-SQL, PostgreSQL has PL/PgSQL (which tries to emulate PL/SQL to an extent). Aside from some proprietary functions (notably Oracle's
UTL_FILE package) PL/SQL code closely resembles Transact-SQL, allowing trivial conversion if the code does not use proprietary features.
- PL/pgSQL - SQL Procedural Language
- Steven Feuerstein (2002). Oracle PL/SQL Programming, 3rd ed. O'Reilly & Associates. ISBN 0596003811.
(Many consider this book the "bible" of PL/SQL development)
- Oracle PL/SQL FAQ
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details