What’s New in SQL2003 (SQL3)

SQL99 had two main parts, Foundation:1999 and Bindings:1999. The SQL3 Foundation section includes all of the Foundation and Bindings standards from SQL99, as well as a new section called Schemata.

The Core requirements of SQL3 did not change from Core SQL99, so the database platforms that conformed to Core SQL99 automatically conform to SQL3. Although the Core of SQL3 has no additions (except for a few new reserved words), a number of individual statements and behaviors have been updated or modified. Because these updates are reflected in the individual syntax descriptions of each statement in Chapter 3, we won’t spend time on them here.

A few elements of the Core in SQL99 were deleted in SQL3, including:

  • The BIT and BIT VARYING datatypes

  • The UNION JOIN clause

  • The UPDATE . . . SET ROW statement

A number of other features, most of which were or are rather obscure, have also been added, deleted, or renamed. Many of the new features of the SQL3 standard are currently interesting mostly from an academic standpoint, because none of the database platforms support them yet. However, a few new features hold more than passing interest:

Elementary OLAP functions

SQL3 adds an Online Analytical Processing (OLAP) amendment, including a number of windowing functions to support widely used calculations such as moving averages and cumulative sums. Windowing functions are aggregates computed over a window of data: ROW_NUMBER, RANK, DENSE_RANK, PERCENT_RANK, and CUME_DIST. OLAP ...

Get SQL in a Nutshell, 3rd Edition 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.