We all love open source software. Wouldn’t it be great if international standard documents such as the SQL standard would be open too?
While they are public—as opposed to secret—the SQL standard is not free—as in beer.
If you really want to get a copy of the standard, you have to bite the bullet. The best advice I have is to check the prices in the various stores of the member bodies (ANSI, DIN, …) around the globe. In particular your local one might have a better price in your local currency.
However, the freely accessible information on this website and on this page in particular might be good enough for your purpose. So check it out!
- SQL:2023
A new part was added: 9075-16:2023 Property Graph Queries (SQL/PGQ).
The other parts were also updated. Most notably several additions to JSON functionality.
Dedicated article on modern-sql.com: “SQL:2023”
Recommended reading: SQL:2023 is finished: Here is what’s new
- 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)0: 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 https://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 https://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.