14. Writing and Executing SQL Routines and Modules—Triggers and Stored Procedures
Although SQL is not a complete programming language—it lacks I/O statements—the standard does contain statements that perform typical programming language functions such as assignment, selection, and iteration for writing persistent stored modules (PSMs). This chapter looks at creating program routines and modules using those language elements and how they are executed as either triggers or stored procedures.
Note: This chapter does not attempt to teach programming concepts. To get the most out of it you should be familiar with a general-purpose programming or scripting language such as COBOL, C, C++, Java, JavaScript, or Perl.
Triggers are SQL program modules that ...

Get SQL Clearly Explained, 2nd Edition 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.