SQL:2023

{{Short description|2023 edition of the SQL standard}}

{{SQL language revisions}}

SQL:2023 or ISO/IEC 9075:2023 (under the general title "Information technology – Database languages – SQL") is the ninth edition of the ISO (1987) and ANSI (1986) standard for the SQL database query language. It was formally adopted in June 2023.

New features

SQL:2023 includes new and updated features.{{cite web | last = Eisentraut | first = Peter |url= https://peter.eisentraut.org/blog/2023/04/04/sql-2023-is-finished-here-is-whats-new | type = World wide web log |title= SQL:2023 is finished: Here is what's new |date=4 April 2023 |access-date=2024-11-08}} The changes can be grouped into three main areas:

  • Property graph queries, a graph query language built on top of SQL
  • The new part 16, “Property Graph Queries (SQL/PGQ)”,{{cite web | url=https://www.iso.org/standard/79473.html | work = ISO/IEC 9075-16:2023 Information technology | title = Database languages SQL — Part 16: Property Graph Queries (SQL/PGQ) | publisher = ISO | date = 2023 |access-date= 2023-06-05}} has been added to the SQL standard.
  • New features related to JSON{{cite web |date=1 June 2023 |title=SQL: 2023 is Released – A Leap Forward in Data Management |url=https://stackdiary.com/sql-2023-is-released/ |archive-url=https://web.archive.org/web/20230602210744/https://stackdiary.com/sql-2023-is-released/ |archive-date=2023-06-02 |access-date=2023-06-02 |work=Stack diary}}
  • JSON data type (T801)
  • Enhanced JSON data type (T802)
  • String-based JSON (T803)
  • Hex integer literals in SQL/JSON path language (T840)
  • SQL/JSON simplified accessor (T860–T864)
  • SQL/JSON item methods (T865–T878)
  • JSON comparison (T879–T882)
  • Various smaller changes to the existing SQL language (all optional features):
  • UNIQUE null treatment (F292)
  • ORDER BY in grouped table (F868)
  • GREATEST and LEAST (T054)
  • String padding functions (T055)
  • Multi-character TRIM function (T056)
  • Optional string types maximum length (T081)
  • Enhanced cycle mark values (T133)
  • ANY_VALUE (T626)
  • Underscores in numeric literals (T662)

= Property Graph Queries (SQL/PGQ) =

SQL/PGQ reduces the difference in functionality between relational DBMSs and native graph DBMSs. Basically, this new feature makes it easier to query data in tables as if it were in a graph database, providing a possibly more intuitive alternative to writing complex join queries.{{Sfn | Eisentraut | 2023}}

In comparison, the GQL standard for graph DBMSs adds graph updates, querying multiple graphs, and queries that return a graph result rather than a binding table.{{cite journal |url=https://ir.cwi.nl/pub/32773 |title=DuckPGQ: Efficient property graph queries in an analytical RDBMS |last1=ten Wolde |first1=Daniel |last2=Singh |first2= Tavneet |last3=Szárnyas |first3=Gábor |last4=Boncz |first4=Peter |date=8 January 2023 | publisher = CWI | journal = IR | place = NL |access-date=2023-06-02}}

See also

{{Wikibook|Structured Query Language}}

References

{{Reflist}}