Contrary to some previous writeups, SQL in its native (ANSI standard) form is not like COBOL or any other procedural language. SQL by itself makes no provision for ordinary procedural constructs, such as branching, selection, or iteration.

Standard SQL is designed to create and interact with result sets (rows of data, analagous to records in a file). SQL can interact with persistent result sets (database tables), or temporary result sets in memory (such as those generated from subqueries). SQL provides language elements that allow retrieval of rows from persistent result sets (SELECT), update of persistent result sets (UPDATE), creation or extension of result sets (INSERT), and reduction or destruction of result sets (DELETE).

Most database vendors have enhanced their SQL implementations with proprietary extensions that offer procedural language capabilities. Two examples are Oracle's PL/SQL, and Microsoft's Transact/SQL. Both combine familiar procedural constructs (IF-THEN-ELSE, LOOP, etc.) with basic SQL language operators and functions to enable the creation of stored procedures, triggers, and other types of SQL-based "programs". DBMS vendors also typically extend SQL's capabilities with proprietary functions and datatypes.