Chapter 14. Using Procedure and Function Calls

EVERY SQL PROGRAMMER should makes friends with an APL, LISP, or FP programmer and pump them for programming tricks. These programming languages make heavy use of nesting function calls and recursion.

While computational languages (such as FORTRAN) and specialized statistical and mathematical languages have very rich function libraries, most SQL implementations are much poorer. This is not a bad thing; SQL is a data management and retrieval language, and it was never meant for string handling, numerical computations, or application development.

All that having been said, you can still use its function library to good advantage to scrub and manipulate data.

Get Joe Celko's Thinking in Sets: Auxiliary, Temporal, and Virtual Tables in SQL 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.