Chapter 12. Miscellaneous SQL Topics

THIS LAST CHAPTER IS SOMETHING OF A POTPOURRI; it discusses a few SQL features that, for one reason or another, don’t fit very neatly into any of the previous chapters. It also gives a BNF grammar for SQL table expressions, for purposes of reference.

Also, this is as good a place as any to define two terms that you need to watch out for. The terms in question are implementation defined and implementation dependent, and they’re heavily used in the SQL standard. Here are the definitions:

Definition: An implementation defined feature is one whose semantics can vary from one implementation to another, but do at least have to be specified for any individual implementation. In other words, the implementation is free to decide how it will implement the feature in question, but the result of that decision must be documented. An example is the maximum length of a character string.
Definition: An implementation dependent feature, by contrast, is one whose semantics can vary from one implementation to another and don’t even have to be specified for any individual implementation. In other words, the term effectively means undefined; the implementation is free to decide how it will implement the feature in question, and the result of that decision need not be documented (it might even vary from release to release). An example is the full effect of an ORDER BY clause if the specifications in that clause fail to specify a total ordering.

SELECT *

Use of the “SELECT ...

Get SQL and Relational Theory 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.