*** Welcome to piglix ***

SQL:1999


SQL:1999 (also called SQL 3) was the fourth revision of the SQL database query language. It introduced a large number of new features, many of which required clarifications in the subsequent SQL:2003. In the meanwhile SQL:1999 is deprecated.

The ISO standard documents were published between 1999 and 2002 in several installments, the first one consisting of multiple parts. Unlike previous editions, the standard's name used a colon instead of a hyphen for consistency with the names of other ISO standards. The first installment of SQL:1999 had five parts:

Three more parts, also considered part of SQL:1999 were published subsequently:

The SQL:1999 standard calls for a Boolean type, but many commercial SQL servers (Oracle Database, IBM DB2) do not support it as a column type, variable type or allow it in the results set. Microsoft SQL Server is one of the few database systems that properly supports BOOLEAN values using its "BIT" data type. Every 1-8 BIT fields occupies one full byte of space on disk. MySQL interprets "BOOLEAN" as a synonym for TINYINT (8-bit signed integer).PostgreSQL provides a standard conforming Boolean type

Sometimes called just distinct types, these were introduced as an optional feature (S011) to allow existing atomic types to be extended with a distinctive meaning to create a new type and thereby enabling the type checking mechanism to detect some logical errors, e.g. accidentally adding an age to a salary. For example:

creates two different and incompatible types. The SQL distinct types use name equivalence not structural equivalence like typedefs in C. It's still possible to perform compatible operations on (columns or data) of distinct types by using an explicit type CAST.

Few SQL systems support these. IBM DB2 is one those supporting them.Oracle database does not currently support them, recommending instead to emulate them by a one-place structured type.


...
Wikipedia

...