
We all love open source software. Wouldn’t it be great if international standard documents such as the SQL standard would be open too?
As a matter of fact: they are!
However, they are not free—just public. Very much like open source software is not necessarily free. Too often, we neglect these differences. Just because we have to pay for the standard doesn’t mean it is secret.
A download of the most relevant part of the SQL standard—part 2—is available for EUR 180 at Austrian Standards. The 2011 version can still be bought for USD 60 at ANSI. It might pay off to check the prices at other ISO members. The SQL standards is not free, but affordable.0
Nevertheless there are some free resources that can help you answering questions about the SQL standard:
- SQL:2020+
Work on adding a new part (16, SQL/PGQ) is currently ongoing (see also: GQL Scope and Features).
Processing of streaming data was also worked on as of June 2018.1
- SQL:2019
A new part was released in June 2019: 9075-15:2019 Multi-dimensional arrays (SQL/MDA).
Recommended documents:
The standard at ISO for CHF 198: ISO/IEC 9075-15.
Technical report on MDA at ISO for CHF 178 (probably an updated version of the free report above)2: ISO/IEC 19075-8.
- SQL:2016
ISO released some highly relevant technical reports for free:
SQL support for JavaScript Object Notation (JSON) (ISO/IEC TR 19075-6:2017)
Polymorphic table functions in SQL (ISO/IEC TR 19075-7:2017)
Also note that I’ve written about the following features:
listagg
.Browsable BNF grammar of Part 2.
SQL:2016 validator: https://developer.mimer.com/sql-2016-validator/
- SQL:2011
Recommended articles (PDF):
Part 1 can be downloaded free of charge from ISO
ISO released a free technical report on “SQL Support for Time-Related Information” (covers temporal tables).
Browsable BNF grammar of Part 2 and Part 4.
Drafts of all parts are linked as “SQL:20nn Working Draft Documents” at http://www.wiscorp.com/SQLStandards.html.
- SQL:2008
Browsable BNF grammar of Part 2.
- SQL:2003
Browsable BNF grammar of Part 2 (alternative source).
- SQL:1999
The full content of the book “SQL-99 Complete, Really” is available online and for free at the crate.io. In total conflict to its title, the book only covers Core SQL:1999.
Online validator at https://developer.mimer.com/.
Browsable BNF grammar of Part 2 (alternative source).
- SQL-92
A draft of the standard text is available at http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt.
Browsable BNF grammar of Part 2 (alternative source).
- SQL-86
The standard is available as FIPS 127 at nist.gov.