About
A SQL Procedure is a database unit of execution written in a procedural language (PL) designed to embrace SQL statements within its syntax.
Type
Tabulify supports the 2 kind of procedures:
- a stored procedure (ie stored in the database)
- a anonymous block procedure (ie written in a SQL script)
Syntax
The procedural language syntax is database dependent and is generally designed to embrace SQL statements within its syntax.
The body can be:
- a simple statement such as SELECT or INSERT,
- or a block statement written using BEGIN and END. block statements can contain
- declarations,
- loops,
- and other control structure statements.
Below is a non-exhaustive list of procedural languages (PLs) by database.
| System | Procedural language (PL) |
|---|---|
| MySQL | Stored Routine |
| Oracle | Oracle PL/SQL |
| Postgres | PL/pgSQL, PL/Tcl, PL/Perl, PL/Python |
| SQLite | Not Supported |
| SqlServer | T-SQL (Transact SQL) |