Download Tutorial Reviews Textbook Glossary
Free Download
White Papers
SQL-99 Textbook
Company Info

SQL Tutorial

  • SQL Books
  • DBMS Books
  • JDBC Books
  • ADO Books
  • MySQL Books
  • Sybase Books
  • Informix Books
  • DB2 Books

    Get a free copy of our DBMS

    Order our book

    This page contains errata, additions, and expansions for the standard reference book on SQL-99 (formerly known as SQL3). We will update this page as necessary.

    GENERAL BOOK INFO . Size 1078 pages plus about 400 on the accompanying CD-ROM. Chapter headings: Introduction, General Concepts, Numbers, Bit Strings, Binary Strings, Characters, Character Strings, Temporal Values, Boolean Values, Collection Types, Row Types, Reference Types, NULLs, SQL Clusters, AuthorizationIDs, SQL Catalogs, SQL Schemas, SQL Tables and Views, SQL Domains, SQL Constraints and Assertions, SQL Character Sets, SQL Collations, SQL Translations, SQL Triggers, SQL-Invoked Routines, PSM, User-Defined Types, Introduction to SQL-Data Operations, Simple Search Conditions, Searching With Joins, Searching With Subqueries, Searching With Set Operators, Searching With Groups, Sorting Search Results, Changing SQL-Data, SQL Transactions, SQL Transaction Concurrency, SQL Sessions, Embedded SQL Binding Style, SQL/CLI Binding Style, SQL/CLI: env Functions, SQL/CLI: SQL/CLI: dbc Functions, SQL/CLI: stmt Functions, SQL/CLI Statement Functions, SQL/CLI: Cursor Functions, SQL/CLI: desc Functions, SQL/CLI Diagnostic Functions, SQL/CLI: General Functions, SQL/CLI Deferred Parameter Functions, SQL/CLI Locator Functions, SQL/CLI Catalog Functions, Module Binding Style, Style, Remote Database Access, SQL Taxonomy, Non-Portable SQL Features, Incompatibilities with SQL-92, SQL Web Sites, Glossary. The CD-ROM includes a sample DBMS.

    "... great detail in a readable style" (Intelligent Enterprise magazine)

    ORDERING INFO . When calling your bookstore, have the following information handy ...

    Title = "SQL-99 Complete, Really";

    Authors = "Peter Gulutzan & Trudy Pelzer";

    Year = "1999";

    Publisher = "CMP Books";

    ISBN = "0-87930-568-1"

    ISBN of Chinese translation = "7-111-07773-3"

    The publisher's web site is . Of course you can also order from Ask your local library to stock a copy too!

    ERRATA .

    CHAPTER 1.
    Page 4. ISO/IEC 9075:1999 has not been adopted yet; however, the USA's representative committee has voted to recommend the adoption of Parts 1, 2, 4 and 5. Part 3 will take longer.
    Page 11. The statement regarding evaluation order is too strong. The ISO standard (framework) document says expressions are "generally" evaluated from left to right. It doesn't say they must be.

    CHAPTER 2.
    Page 18. The headings in the table should be transposed: Mathematicians to the left, Germans to the right.
    Page 47. At the bottom of the page, the line that says "Because there is no mapping of accented characters in an identifier ..." is more clearly stated as "Because there is no mapping of accented characters to unaccented characters (i.e.: to simple Latin letters) in an identifier ...".

    CHAPTER 3.
    Page 52,53. For definition of DECIMAL and NUMERIC, it is stated that the scale should be "less than" the precision. The correct wording would be: "less than or equal to".

    CHAPTER 5.
    Page 83. In the last paragraph we say:
    "A BLOB literal is the letter "X" (uppercase mandatory) followed by a string of zero or more hexits inside a pair of single quote marks."
    Clarification: Since a BLOB is normally measured in octets (or pairs of hexits), this should read:
    "A BLOB literal is the letter "X" (uppercase mandatory) followed by a string of zero or more hexit pairs inside a pair of single quote marks."
    Later in the same paragraph, we say:
    "The [BLOB] literal's length is four times the number of hexits inside the quote marks ...."
    Clarification: Here, we mean the literal's length in bits, not its length in octets.
    Page 90. The OVERLAY examples assume that BLOBs can contain uneven numbers of hexits and that OVERLAY works on bit positions, rather than octet positions. This is not so. The examples should read:

    -- returns AB01EF

    -- returns CD012345

    -- returns CD012345EF"

    Page 91. The POSITION example assumes that POSITION works on bit positions, rather than octet positions. Again, this is not so. The example should read:

    "POSITION(X'3D' IN X'AF923DA7')
    -- returns 3

    CHAPTER 6.
    Page 97. The word "Saan" should be "Sann", and "St" is not a digraph.

    CHAPTER 7.
    Page 121. The maximum Ocelot size is now larger than 4096.

    CHAPTER 8.
    Page 165. "60560524" is a misprint; read "60x60x24".
    Page 172. The text implies that YEAR TO YEAR is legal. It was valid in SQL-92, but is not valid in SQL-99.

    CHAPTER 16.
    Page 286. The file+directory structure has changed; now the catalog and schema name determine where files go, and you can change catalog and schema name with SET statements.

    CHAPTER 21.
    It is frustrating to note that NIST requires vendors to support this illegal syntax:
    NIST is mistaken, but nobody notices because few vendors support character sets at all.

    CHAPTER 24.
    The vendor support for triggers is now: (for DB2 and Ingres and Oracle and Sybase) either "by row" or "by statement" and either "before" or "after" triggers; (Microsoft SQL Server 7) only "by statement" and "after" triggers.

    CHAPTER 25.
    Page 489. The symbol used in the "Tip" should be the Greek letter Pi, instead of the Greek letter Rho.

    CHAPTER 26.
    Page 503. The syntax for a PSM variable declaration has been oversimplified. The correct syntax is:

    variable declaration ::=
    DECLARE SQL variable name [ { , SQL variable name } ] data type [ DEFAULT default value ]

    CHAPTER 27.
    Page 519. The UDT example should show the attribute list within parentheses.

    CHAPTER 29.
    Page 549. The words "In each case" are too broad, since there is an exceptional case (shown in the diagram). The diagram does not show UNNEST.

    CHAPTER 31.
    Page 601. Remove the square brackets around
    because commalists for IN predicates must have at least 2 values in SQL-99. {Note: This restriction has been removed from SQL:2003 which, once again, allows the IN list to contain a single value.)

    CHAPTER 35.
    Page 664 (query expression). We say:
    "If you're using a query expression the INSERT's Table name may not identify a Table that also appears in any FROM clause in that query expression."
    That statement is no longer true, the restriction has been removed from the Standard.

    CHAPTER 40.
    Page 754. In the algorithm description at the top of the page, replace the line:
    "Set # of octets to copy = strlen(Source)- sizeof(null-terminator)"
    "Length: # of octets to copy".
    Also, in the examples at the bottom of the page, both comment lines should say that returnsize = 3.

    CHAPTER 46.
    Page 833. Add: "[Obscure Rule] when SQL_DESC_OCTET_LENGTH_POINTER is a null pointer, and the data type is string, DBMSs will assume that the string is null-terminated."
    Page 864. Replace the word SQLGetDiagnostics with the word SQLGetDiagField.
    Page 881. Repace the expression ColumnLength+2 with the expression Columnsize+2.

    CHAPTER 47.
    Page 898. The alternate name for status record 0025 is SQL_DIAG_CONDITION_IDENTIFIER.
    Page 913. The words "only 5.4" should read "only 5.43".

    CHAPTER 53.
    Page 1005. Before applying the rule re Capitals, read this tragic tale re Inprise (Delphi) BDE. A user got a result set via: SELECT * FROM Emps. Then, using TDBNavigator, he tried to update the field -- not realizing that Delphi will internally generate: UPDATE "Emps" ... that is, Delphi changes a regular identifier to a delimited identifier during under-the-covers processing. Result: weird errors.
    Also in this chapter: To indicate the language of a program file, some programmers use these conventional extensions: ".SQL", or ".xyy" where x = {P or S or M} meaning {precompiler or standard or module}, and yy = {AD or C or CO or FO or PA} (Ada or C or COBOL or Fortran or Pascal). For example, "hello.pc" is a precompiler C program. But others would call it "" (where e presumably stands for embedded).

    We should perhaps have mentioned that RDA is not to be confused with IBM's DRDA (Distributed Relational Database Architecture). DRDA and RDA are both specs for client/server messaging, but are mutually incompatible. Several vendors support DRDA.

    The feature-identification numbers have changed since the book went to press.

    Under "ACTIVE", add:
    A query which returns zero rows does not necessarily make a transaction active.
    Under "AGENT", add alternative definition:
    An SQL agent can be thought of as something (either a user or a program) that produces SQL statements.
    Add new entry:
    "FAP: stands for Format and Protocols, refers to formal specification of the structure and handshaking necessary for client/server interaction".

    CD-ROM .
    The sample DBMS can be updated by uploading files from elsewhere on this web site. The links in the .htm files won't work with some browsers because they refer to .html extensions; you can get around this by copying to *.htm files on your C: drive.

    Copyright (c) 1999-2003 by Ocelot Computer Services Inc. All rights reserved.

    Return to Ocelot home page