Part IV. Procedural Database Objects

In Section 1.4, we mentioned that, for a long time SQL, was a purely declarative language, but this changed in 1986–1987 when SQL products on the market began to support so-called stored procedures. That changed the character of SQL. A stored procedure can informally be described as a piece of code that can be called from applications, among other things. This piece of code consists of well-known SQL statements, such as INSERT and SELECT, but also procedural statements, such as IF-THEN-ELSE and WHILE DO. Because stored procedures offered many practical advantages, other vendors started to implement them. This meant the end of the pure declarative character of SQL. Since their inclusion in the SQL2 standard, ...

Get SQL for MySQL Developers: A Comprehensive Tutorial and Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.