Problem solve Get help with specific problems with your technologies, process and projects.

Trying to find the SQL92 and SQL99 specifications online

Rudy, I am trying to find the SQL92 and SQL99 specifications online. Do you have any links? Specifically I am trying to figure out precisely how NULLs are to be treated in UNIQUE constraints. Are they just another value or do they have a special interpretation according to the standards? If I put a UNIQUE constraint on a column, can I have more than one record with NULL values in that column, or can I have only 1 record with NULL in that constrained column? What do the SQL standard specifications say about this?

The only pages I've found online that resemble SQL specs are very old BNF descriptions for sql92 and sql99. I don't find BNF particularly useful, especially when you're after a semantic interpretation, not just the syntax.

The web site for Mimer SQL (a proprietary database) contains several interesting resources --

  • a list of SQL Reserved Words for SQL-92, SQL-99, and SQL-200x (draft)

  • three SQL Validators for these standards, which allow you to test the validity of an SQL statement, and

  • links to other resources

Listed on the SQL Validator page is the snail mail address of the International Standards Organization, and the web address of the ISO store where you can purchase an official copy of the standards, if you are so inclined (I'm not).

As to your question about whether a UNIQUE column can have more than one NULL, I'm certain the answer is No. NULLs are not just another value, they do have a special interpretation, but if the column is UNIQUE (and assuming it allows NULLs), only one row can have a NULL value.

CORRECTION Please see Multiple unique NULLs, revisited for correct information about multiple nulls in unique indexes.

Dig Deeper on Oracle and SQL

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.