Information technology - Database languages - SQL - Part 2: Foundation (SQL/Foundation) - Technical Corrigendum 2

Technologies de l'information — Langages de base de données — SQL — Partie 2: Fondations (SQL/Fondations) — Rectificatif technique 2

General Information

Status
Withdrawn
Publication Date
04-Jun-2003
Withdrawal Date
04-Jun-2003
Current Stage
9599 - Withdrawal of International Standard
Start Date
15-Dec-2003
Completion Date
30-Oct-2025
Ref Project

Relations

Standard
ISO/IEC 9075-2:1999/Cor 2:2003
English language
301 pages
sale 15% off
Preview
sale 15% off
Preview

Frequently Asked Questions

ISO/IEC 9075-2:1999/Cor 2:2003 is a standard published by the International Organization for Standardization (ISO). Its full title is "Information technology - Database languages - SQL - Part 2: Foundation (SQL/Foundation) - Technical Corrigendum 2". This standard covers: Information technology - Database languages - SQL - Part 2: Foundation (SQL/Foundation) - Technical Corrigendum 2

Information technology - Database languages - SQL - Part 2: Foundation (SQL/Foundation) - Technical Corrigendum 2

ISO/IEC 9075-2:1999/Cor 2:2003 is classified under the following ICS (International Classification for Standards) categories: 35.060 - Languages used in information technology. The ICS classification helps identify the subject area and facilitates finding related standards.

ISO/IEC 9075-2:1999/Cor 2:2003 has the following relationships with other standards: It is inter standard links to ISO/IEC 9075-2:1999, ISO/IEC 9075-2:1999/Cor 1:2000; is excused to ISO/IEC 9075-2:1999. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.

You can purchase ISO/IEC 9075-2:1999/Cor 2:2003 directly from iTeh Standards. The document is available in PDF format and is delivered instantly after payment. Add the standard to your cart and complete the secure checkout process. iTeh Standards is an authorized distributor of ISO standards.

Standards Content (Sample)


INTERNATIONAL STANDARD ISO/IEC 9075-2:1999
TECHNICAL CORRIGENDUM 2
Published 2003-06-01
INTERNATIONAL ORGANIZATION FOR STANDARDIZATION • МЕЖДУНАРОДНАЯ ОРГАНИЗАЦИЯ ПО СТАНДАРТИЗАЦИИ • ORGANISATION INTERNATIONALE DE NORMALISATION
INTERNATIONAL ELECTROTECHNICAL COMMISSION • МЕЖДУНАРОДНАЯ ЭЛЕКТРОТЕХНИЧЕСКАЯ КОМИССИЯ • COMMISSION ÉLECTROTECHNIQUE INTERNATIONALE

Information technology — Database languages — SQL —
Part 2:
Foundation (SQL/Foundation)
TECHNICAL CORRIGENDUM 2
Technologies de l'information — Langages de base de données — SQL —
Partie 2: Fondations (SQL/Fondations)
RECTIFICATIF TECHNIQUE 2
Technical Corrigendum 2 to ISO/IEC 9075-2:1999 was prepared by Joint Technical Committee
ISO/IEC JTC 1, Information technology, Subcommittee SC 32, Data management and interchange.
ISO/IEC 9075-2:1999/Cor. 2:2003 cancels and replaces ISO/IEC 9075-2:1999/Cor. 1:2000.

Statement of purpose for rationale:

A statement indicating the rationale for each change to ISO/IEC 9075 is included. This is to inform the users of
that standard as to the reason why it was judged necessary to change the original wording. In many cases the
reason is editorial or to clarify the wording; in some cases it is to correct an error or an omission in the original
wording.
Notes on numbering:
Where this Corrigendum introduces new Syntax, Access, General and Conformance Rules, the new rules have
been numbered as follows:
Rules inserted between, for example, Rules 7) and 8) are numbered 7.1), 7.2), etc. [or 7) a.1), 7) a.2), etc.]. Those
inserted before Rule 1) are numbered 0.1), 0.2), etc.
Where this Corrigendum introduces new Subclauses, the new subclauses have b een numbered as follows:
Subclauses inserted between, for example, Subclause 4.3.2 and 4.3.3 are numbered 4.3.2a, 4.3.2b, etc.
Those inserted before, for example, 4.3.1 are numbered 4.3.0, 4.3.0a, etc.
ICS 35.060 Ref. No. ISO/IEC 9075-2:1999/Cor.2:2003(E)
©  ISO/IEC 2003 – All rights reserved
Published in Switzerland
ISO/IEC 9075-2:1999/Cor.2:2003(E)
Contents
Page
2 Normative references . . . . . . 9
3.1.1 Definitions taken from ISO/IEC 10646 . . . . . 9
3.1.2 Definitions taken from Unicode . . . . . 9
3.1.5 Defin itions provide d in Part 2 . . . . . . . 10
3.3.1.2 Other terms . . . . . 12
4.1 Data types . . . . . 12
4.2 Character strings . . . . . 1 5
4.2.1 Character strings and collating sequences . . . 1 6
4.2.2.1 Operators that operate on character strings and return character strings . 17
4.2.4 Nam ed charac ter sets . . . 1 7
4.3 Binary strings . . . . . 21
4.3.1 Binary string comparison . . . 22
4.4.1 Bit string comparison and assignment . . . 22
4.5 Numbe rs . . . . . 22
4.5.1 Characteristics of num bers . . . 23
4.5.2 Operations invo lving numbers . . . 24
4.6.1 Comparison and assignment of booleans . . . 24
4.7.1 Datetimes . . . . . 24
4.7.2 Interva ls . . . . . 2 5
4.7.3 Op erations invo lving datetim es and interv als . . . 25
4.8 User-defined types . . . . 2 6
4.8.1 Observers an d mutators . . . 2 7
4.8.2 Constructors . . . . . 27
4.8.4 User-defined type comparison and assignment . . . 2 8
4.9 Row types . . . . . 28
4.10 Reference types . . . . . 2 8
2 ©  ISO/IEC 2003 – All rights reserved

ISO/IEC 9075-2:1999/Cor.2:2003(E)
4.11 Collection types . . . . . 29

4.11.2 Collection comparison . . . 30
4.12 Type conversions and mixing of data types . . . 30
4.13 Data conversions . . . . . 30
4.16 Tables . . . . . 30
4.16.1 Types of tables . . . . . 31
4.16.3 Operations involving tables . . . 32
4.17 Integrity constraints . . . . 32
4.17.1 Ch ecking of c onstraints . . . 33
4.17.2 Ta ble constrain ts . . . . 33
4.18.1 General rules and definitions . . . 34
4.18.4 Known functional dependencies in a . . . 34
4.18.9 Known functional dependencies in the result of . 34
4.18.10 Known functional dependencies in a . 35
4.20 SQL-schemas . . . . . 35
4.21 SQL-client modules . . . . 35
4.23 SQL-invoked routines . . . 3 6
4.24 Built-in functions . . . . 39
4.25 SQL-paths . . . . . 4 0
4.26.4 Locators . . . . . 40
4.27 Diagnostics area . . . . . 40
4.30.1 Cla sses of SQ L-stateme nts . . . 4 1
4.30.2 SQL-statements classified by functions . . . 4 2
4.30.3 SQL-statements and transaction states . . . 42
4.30.4 SQ L-stateme nt atomicity . . . 43
4.31.1 Authorization iden tifiers . . . 44
4.32 SQL-transactions . . . . 44
4.34 SQL-sessions . . . . . 45
4.34.1 Ex ecution co ntexts . . . . 45
4.35 Triggers . . . . . 46
4.35.2 Execution o f triggers . . . 46
4.36 Client-server operation . . . 47
5.2 an d . . . 47
5.3 . . . . . 51
5.4 Names an d identifiers . . . . 5 2
6.1 . . . . . 53
6.3 and . . . 56
6.5 . . . . . 58
6.6 . . . . 60
6.8 . . . . . 6 2
6.11 . . . 6 2
6.14 . . . 63
6.16 . . . 63
6.17 . . . 65
6.18 . . . 66
6.19 . . . 7 2
6.20 . . . 7 2
6.22 . . . . 7 3
6.23 . . . . 77
6.24 . . . . 79
6.25 . . . . 80
6.26 . . . 81
©  ISO/IEC 2003 – All rights reserved 3

ISO/IEC 9075-2:1999/Cor.2:2003(E)
6.27 . . . . . 8 1
6.28 . . . . . 83
6.29 . . . . . 84
6.30 . . . . . 8 5
7.1 . . . . . 8 5
7.2 . . . . . 86
7.3 . . . . . 87
7.6

. . . . . . 87
7.7 . . . . . . . 93
7.8 . . . . . . . 9 4
7.9 . . . . . 94
7.10 . . . . 1 0 2
7.11 . . . 1 0 2
7.12 . . . 1 05
7.13 . . . 1 10
7.14 . . . . . 1 13
8.2 . . . 1 13
8.3 . . . 1 1 5
8.4 . . . . . 1 1 5
8.5 . . . . . 1 16
8.6 . . . 1 17
8.7 . . . . . 1 19
8.8 . . . 1 19
8.10 . . . 1 20
8.11 . . . 1 20
8.12 . . . 1 22
8.13 . . . 1 23
8.14 . . . . 1 23
9.0 Determination of identical values . . . 1 23
9.1 Retrieval assignment . . . 1 25
9.2 Store assignment . . . . . 1 2 6
9.3 Data types of results of aggregations . . . 1 2 6
9.5 Type precedence list . . . 1 2 7
10.3 . . . 1 27
10.4 . . . 1 2 7
10.5 . . . . . 1 3 6
10.6 . . . 1 37
10.7 . . . 1 38
10.8 . . . . 1 41
10.12 Execution of triggers . . . 1 4 1
10.13 Execution of array-returning functions . . . 1 41
10.14 D ata type iden tity . . . 1 43
11.1 . . . 1 44
11.2 . . . 1 45
11.3
. . . 1 46
11.4 . . . 1 49
11.5 . . . . 1 50
11.7 . . . 1 50
11.8 . . . 1 5 1
11.9 . . . 1 57
11.16 . . . 1 57
11.17 . . . 1 58
4 ©  ISO/IEC 2003 – All rights reserved

ISO/IEC 9075-2:1999/Cor.2:2003(E)
11.19 . . . 1 5 8
11.20 . . . 1 59
11.21 . . . 1 5 9
11.22 . . . 1 61
11.23 . . . 1 61
11.30 . . . 1 6 2
11.31 . . . 1 6 2
11.32 . . . 1 6 3
11.33 . . . 1 63
11.35 . . . 1 63
11.36 . . . 1 64
11.37 . . . 1 64
11.38 . . . 1 66
11.40 . . . 1 66
11.41 . . . 1 7 7
11.43 . . . 1 78
11.44 . . . 1 78
11.45 . . . 1 79
11.46 . . . 1 83
11.47 . . . 1 87
11.48 . . . 1 90
11.49 . . . 191
11.50 . . . 200
11.51 . . . 2 01
11.52 . . . 2 01
11.53 . . . 2 03
11.54 . . . 2 03
11.55 . . . 2 05
11.56 . . . 2 07
11.57 . . . 2 07
12.2 . . . 2 08
12.4 . . . 2 08
12.6 . . . 2 09
13.1 . . . 2 11
13.2 . . . 2 11
13.3 . . . 2 12
13.4 Calls to an . . . 2 12
13.5 . . . 2 14
13.6 Data type correspondences . . . 2 1 7
14.1 . . . . 2 17
14.3 . . . 2 20
14.4 . . . 2 21
14.5 . . . 2 21
14.6 . . . 2 22
14.8 . . . 2 23
14.9 . . . 2 24
14.10 . . . 2 26
14.11 . . . 2 2 7
14.12 . . . 2 2 7
14.14 Effe ct of deleting ro ws from b ase table . . . 2 2 7
14.17 Effect of inserting tables into base tables . . . 2 28
14.18 Effe ct of inserting a ta ble into a deriv ed table . . . 2 29
©  ISO/IEC 2003 – All rights reserved 5

ISO/IEC 9075-2:1999/Cor.2:2003(E)
14.20 Effe ct of replacing rows from base table . . . 2 29
15.2 . . . 2 29
16.4 . . . 2 30
16.5 . . . 2 30
16.6 . . . 2 30
16.7 . . . 2 30
19.1 . . . 2 31
19.2 Pushing and popping the diagnostics area stack . . . 2 34
20.4 CA RDIN AL_N UMB ER dom ain . . . 2 35
20.9 APPLICABLE_RO LES view . . . 2 35
20.11 ATTRIBUTES view . . . 2 35
20. 12 CHARACTER _SETS v iew . . . 2 36
20.12a CHECK_CO NSTRAINT_R OUTINE_USA GE view . . . 2 37
20.14 COLLATION view . . . 2 3 7
20.16 COLUMN _PRIVILEGES view . . . 2 3 8
20.17 COLUMN _UDT_USA GE view . . . 2 3 8
20.18 COLUMN S view . . . 2 39
20.19 CONSTRAINT _COLUM N_USAGE view . . . 2 40
20.21 DATA_TYPE_PR IVILEGES view . . . 2 4 1
20.23 DIRECT_SUPERTY PES view . . . 2 4 2
20.25 DOMAIN_U DT_USAG E view . . . 2 42
20.26 DOMAINS view . . . 2 42
20.27 ELEMENT_TY PES view . . . 2 43
20.29 FIELDS view . . . . . 2 44
20.30 KEY_COLUM N_USAGE view . . . 2 44
20.31 METHOD_S PECIFICATION_PAR AMETER S view . . . 2 45
20.32 METHOD_S PECIFICATIONS view . . . 2 46
20.33 PARAMETE RS view . . . 2 4 7
20.34 REFERENCED _TYPES view . . . 2 48
20.35 REFERENTIAL_CO NSTRAINTS view . . . 2 49
20.38 ROLE_TABLE_G RANTS view . . . 2 49
20.43 ROUTINE_PRIVILEG ES view . . . 2 50
20.44a ROUTINE_ROU TINE_USAGE view . . . 2 50
20.45 ROUTINES view . . . 2 5 1
20.53 TABLE_CON STRAINTS view . . . 2 5 2
20.54 TABLE_METH OD_PRIVILEGES view . . . 2 52
20.55 TABLE_PRIVILEGES view . . . 2 53
20.56 TABLES view . . . . 2 53
20.57 TRANSFORM S view . . . 2 54
20.58 TRANSLATION S view . . . 2 54
20.59 TRIGGERED_U PDATE_CO LUMNS view . . . 2 55
20.60a TRIGGER_ROU TINE_USAGE view . . . 2 55
20.62 TRIGGERS view . . . 2 56
20.63 USAGE_PRIVILEG ES view . . . 2 58
20.64 UDT_PRIVILEGES view . . . 2 58
20.65 USER_DEFINED_T YPES view . . . 2 58
20.66a VIEW_ROUT INE_USAGE view . . . 2 5 9
20.62 TRIGGERS view . . . 2 60
20.68 VIEWS view . . . . . 2 60
20. 69 Sho rt name views . . . 2 61
20.70 Definition of SQL built-in functions . . . 2 66
21.3 EQUAL_KEY _DEGREES assertion . . . 2 66
6 ©  ISO/IEC 2003 – All rights reserved

ISO/IEC 9075-2:1999/Cor.2:2003(E)
21.6 AS SERT IONS base table . . . 2 67
21.7 AT TRIBU TES ba se table . . . 2 67
20.7a CH ARA CTER _ENC ODIN G_FO RMS base table . . . 2 67
21.7b C HAR ACT ER_R EPER TOIR ES base table . . . 2 68
21.8 CH ARA CTER _SETS base table . . . 2 69
21.9a CH ECK _CON STRA INT_R OUT INE_U SAG E base table . 2 70
21.12 C OLLA TION S base tab le . . . 2 71
21.14 C OLU MNS base table . . . 2 72
21.15 D ATA _TYP E_DE SCRIP TOR base table . . . 272
21.16 DIRECT_SUPERTABLES . . . 2 77
21.23 METHOD_SPECIF ICATION_PARAMETERS . . . 2 77
21.24 M ETHO D_SP ECIFIC ATIO NS bas e table . . . 2 78
21.25 PA RAM ETER S base tab le . . . 2 7 9
21.30 R OUT INE_C OLU MN_ USA GE bas e table . . . 2 79
21.31 R OUT INE_P RIVIL EGES base table . . . 27 9
21.31a R OUT INE_R OUT INE_U SAG E base tab le . . . 2 79
21.32 R OUT INE_T ABL E_US AGE base table . . . 2 80
21.33 R OUT INES b ase table . . . 2 80
21.34 SC HEM ATA base table . . . 2 82
21.35 SQ L_FEA TUR ES base table . . . 2 82
21.36 SQ L_IM PLEM ENTA TION _INFO base table . . . 28 3
21.37 SQ L_LA NGU AGE S base tab le . . . 28 4
21.38 SQ L_SIZIN G base ta ble . . . 28 4
21.39 SQ L_SIZIN G_PR OFILE S base tab le . . . 2 8 5
21.43 TA BLES base table . . . 2 85
21.44 TR ANS FORM S base tab le . . . 2 85
21.45 TR ANS LATIO NS bas e table . . . 2 86
21.47 TR IGGE R_CO LUM N_US AGE base table . . . 28 6
21.47a T RIGG ER_R OUT INE_U SAG E base tab le . . . 2 87
21.48 TR IGGE R_TA BLE_ USA GE bas e table . . . 2 8 8
21.49 TR IGGE RS base table . . . 28 8
21.52 U SER_ DEFIN ED_T YPES base table . . . 2 89
21.54a V IEW_ ROU TINE_ USA GE bas e table . . . 290
21.56 V IEWS base table . . . 2 91
22.1 SQLSTATE . . . . . 2 91
23.1 Ge neral confo rmance re quiremen ts . . . 29 3
Annex A SQL confo rmance summ ary . . . 29 3
Annex B Implem entation-de fined eleme nts . . . 29 9
Annex C Implem entation-de penden t elements . . . 3 03
Annex E Incompatibilities with ISO/IEC 9075:1992 and ISO/IEC 9075-4:1996 . 3 04
Annex F SQL fea ture and package taxonomy . . . 3 07
©  ISO/IEC 2003 – All rights reserved 7

ISO/IEC 9075-2:1999/Cor.2:2003(E)

(Blank page)
8 ©  ISO/IEC 2003 – All rights reserved

ISO/IEC 9075-2:1999/Cor.2:2003(E)
Information technology — Database languages — SQL —
Part 2:
Foundation (SQL/Foundation)
TECHNICAL CORRIGENDUM 2
2 Normative references
1. Rationale: Add mis sing referen ces.
Insert the following items to this Subclause:
ISO/IEC 8859-1:1 998, Inform ation techno logy — 8-bit single-by te coded g raphic cha racter sets - Part 1 : Latin
alphabet No. 1.
ISO/IEC 6429:1992, Information technology — C ontrol functions for coded character sets.
The Internet Assigned Numbers Authority, Character sets.
http://www.iana.org/assignments/character-sets
3.1.1 Definitions taken from ISO/IEC 10646
1. Rationale: Remove unused definitions.
Replace the Subclause with:
This part of ISO/IEC 9075 makes use of the following terms defined in ISO/IEC 10646:
a) character
NOTE 0.1 – This is identical to the Unicode definition of abstract character. In ISO/IEC 9075, when the
relevant character repertoire is UCS, a character can be thought of as that which is represented by one code point.
b) repertoire
3.1.2 Definitions taken from Unicode
1. Rationale: Remove unused definitions.
Replace the Subclause with:
This part of ISO/IEC 9075 makes use of the following terms defined in The Unicode Standard:
a) character encoding form
b) code point
c) control character
d) transcoding
©  ISO/IEC 2003 – All rights reserved 9

ISO/IEC 9075-2:1999/Cor.2:2003(E)
3.1.5 Definitions provided in Part 2
1. Rationale: Clarify assignable and comparable.
Replace item a) with:
a) assignab le: (of types, taken pair wise) The characteristic of a data type, T1, that permits a value of T1
to be assigned to a site of a specified d ata type, T2 (where T 1 may be the sam e as T2).
2. Rationale: Clarify the d efinition of “as signmen t”
Replace item b) with:
b) assignment: The operation whose effect is to ensure that the value at a site T (known as the target) is
identical to a given value S (known as the source). Assignment is frequently indicated by the use of the
phrase “T is set to S” or “the value of T is set to S”.
3. Rationale: Clarify the definition of “comparable”
Replace item i) with:
i) comp arable (of a pair of valu es): Capab le of being co mpared, a ccording to the rules of Su bclause 8.2
“”. In most, but not all, cases the values of a data type can be compared one
with anoth er. For the spe cification of co mparability o f individual da ta types, see S ubclause s 4.2 to
4.11.
4. Rationale: Correct and clarify the notion of “distinct”.
Replace item l) with:
l) distinct: (of a pair of comparable values): Informally: not equal or not both null or having a pair of
corresponding components that are distinct. Formally:
Two nu ll values of co mparable type are no t distinct.
A null valu e and a no n-null value of compa rable type are distinct.
For two non-null values, the following rules apply:
— Two va lues of pred efined type or reference ty pe are distinct if and only if the y are not eq ual.
— If two values V1 and V2 are of a user-defined type whose comparison form is RELATIVE or MAP
and the result of comparing them for equality according to Subclause 8.2, “ predicate>” is Unknown, then it is implem entation-de penden t whether th ey are distinc t or not;
otherwise , they are distinc t if and only if they are not equ al.
— If two values V1 and V2 are of a structured type who se comparison form is STATE, then they are
distinct if their most specific types are different, or if there is an attribute A of their common most
specific type such that the value o f A in V1 and the value of A in V2 are distinct.
10 ©  ISO/IEC 2003 – All rights reserved

ISO/IEC 9075-2:1999/Cor.2:2003(E)
— Two rows (or partial rows) are distinct if and only if at least one of their pairs of respective fields
is distinct.
— Two arrays are distinct if the arrays do not have the same cardinality or if, for arrays of the same
cardinality, elem ents in the sam e ordinal pos ition in the two arrays are dis tinct.
NOTE 0.1 — The result of evaluating whether or not two comparable values are distinct is never Unknown. The
result of evaluating whether or not two values that are not comparable, for example, values of a user-defined type
that has no comparison type, is not defined.
5. Rationale: Define “equals”.
Insert the following definition:
o.1) equal (of a pair of comparable values): Yielding True if passed as arguments in a predicate> in which the is . See Subclause 8.2, “ predicate>”.
6. Rationale: Define "ide ntical"
Insert the following definition:
s.1) identical (of a pair of values): Indistinguishable, in the sense that it is impossible, by any means
available in S QL, to de tect any differe nce betw een them . For the full defin ition, see Sub clause 9.0
“Determination of identical values”.
7. Rationale: Clarify the distinction between character sets and character repertoires.
Replace item rr) with:
rr) transliteration: A method of translating ch aracters in one character set into charac ters of the same or a
different cha racter set.
8. Rationale: Remove s from the definition of .
In item vv) delete the following bullet items:
— U+200C, Zero Width Non-Joiner
— U+200D, Zero Width Joiner
— U+200E , Left-To-Right M ark
— U+200F , Right-To-Left M ark
9. Rationale: Enhance the definition of for implementations supporting Unicode 3.0.
In item vv) insert the following bullet item:
— U+202F, Narrow No-Break Space
©  ISO/IEC 2003 – All rights reserved 11

ISO/IEC 9075-2:1999/Cor.2:2003(E)
10. Rationale: Remove Zero Width Space from the definition of
In item vv), delete the following bullet item:
— U+200B, Zero Width Space
3.3.1.2 Other terms
1. Rationale: Add definitio n of direct res ult of executing an SQL -statemen t.
Insert the following Subclause:
3.3.1.2 Other terms
An SQ L-stateme nt S1 may be said to be executed as a direct result of executing an SQL-statement if S1 is the
SQL-statement contained in an or that has been
executed.
4.1 Data types
1. Rationale: Chang e "user-defin ed data typ e" to "user-de fined type".
rd
Replace the 3 paragraph with:
SQL su pports three s orts of data typ es: predefined data types, constructed types, and user-defined types.
Predefined data types are sometimes called the “built-in data types”, though not in this International Standard.
User-defined types can be defined by a standard, by an implementation, or by an application.
2. Rationale: Correct oversight in definition of directly based on.
th
Replace the 11 paragraph with:
A structured type ST is directly based on a data type DT if any of the following are true:
a) DT is the declared type of some attribute of ST.
b) DT is the direct supertype of ST.
c) DT is a direct subtype of ST.
d) DT is compatible with ST.
3. Rationale: Add definition of non-referentially based on.
th
Insert the following paragraph immediately after the 15 paragraph:
A data type DT1 is non-referentially based on a data type DT2 if DT1 is not a reference type and is either
directly based on DT2 or is directly based on some data type that is non-referentially based on DT2.
12 ©  ISO/IEC 2003 – All rights reserved

ISO/IEC 9075-2:1999/Cor.2:2003(E)
4. Rationale: Define “usage-dependent” for use in Access Rules
Insert the following inserted paragraph immediately before the 16th paragraph:
A type TY is usage-dependent on a user-defined type UDT if one of the following conditions is true:
— TY is UDT;
— TY is a reference type whose referenced type is UDT;
— TY is a row type, and the dec lared type of a field of TY is usage-dependent on UDT; or
— TY is a collection type, and the declared e lement type of TY is usage-dependent on UDT.
5. Rationale: Provide consistent rules for comparison operations.
Insert the following paragraphs after the last paragraph:
Ordering and comparison of values of the predefined data types requires knowledge only about those
predefined data types. H owever, to be able to co mpare and order va lues of constructed types or o f user-
defined types, additional information is required. We say that some type T is S-ordered, for some set of types
S, if, in order to compare and order values of type T, information about ordering at least one of the types in S
is first required. A definition of S-ordered is req uired for seve ral S (that is, for several sets of types), but not
for all possible such sets.
The general definition of S-ordered is this:
Let T be a type an d let S be a set of types. Then T is S-ordered if one of the following is true:
1. T is a member of S.
2. T is a row type and the de clared type of some field of T is S-ordered.
3. T is an array type and the elem ent type of T is S-ordered.
4. T is a structured type whose comparison form is ST ATE and the declared type of som e attribute of T is
S-ordered.
5. T is a user-defined type whose comparison form is MAP and the return type of the SQL-invoked
function that is identified by the is S-ordered.
6. T is a reference type with a derived representation and the declared type of some attribute enumerated
by the is S-ordered.
The notion of S-ordered is applied in the following definitions:
A type T is LOB-ordered if T is L-ordered, where L is the set of large object types.
A type T is array-ordered if T is ARR-ordered, where ARR is the set of array types.
A type T is reference-ordered if T is REF-ordered, where REF is the set of reference types.
©  ISO/IEC 2003 – All rights reserved 13

ISO/IEC 9075-2:1999/Cor.2:2003(E)
A type T is DT-EC-ordered if T is DTE-ordered, where DTE is the set of distinct types with EQUALS ONLY
comparison form (DT-EC stands for “distinct type - equality comparison”)
A type T is DT-FC-ordered if T is DTF-ordered, where DTF is the set of distinct types with FULL
comparison form.
A type T is DT-NC-ordered if T is DTN-ordered, where DTN is the set of distinct types with no comparison
form.
A type T is ST-EC-ordered if T is STE-ordered, where STE is the set of structured types with EQUALS ONLY
comparison form.
A type T is ST-FC-ordered if T is STF-ordered, where STF is the set of structured types with FULL
comparison form.
A type T is ST-NC-ordered if T is STN-ordered, where STN is the set of structured types with no comparison
form.
A type T is ST-ordered if T is either ST-EC-ordered, ST-FC-ordered or ST-NC-ordered.
A type T is UDT-EC-ordered if T is either DT-EC-ordered or ST-EC-ordered (UDT stands for “user-defined
type”).
A type T is UDT-FC-ordered if T is either DT-FC-ordered or ST-FC-ordered
A type T is UDT-NC-ordered if T is either DT-NC-ordered or ST-NC-ordered
6. Rationale: Definition required to define certain kinds of non-determinism involving comparison of datetime
with time zone with datetime without time zone.
Insert the following paragraph after the last paragraph:
The notion of constituent of a declared type DT is defined recursively as follows:
— DT is a constituent of DT.
— If DT is a row type, then each field of DT is a constituent of DT
— If DT is a collection type, then the element type of DT is a constituent of DT.
— Every constituent of a con stituent of DT is a constituent of DT.
7. Rationale: Clarify assignable and comparable.
Insert the following paragraph after the last paragraph:
Two da ta types, T1 and T2, are said to be compa tible if T1 is assignable to T2, T2 is assignable to T1, and
their descriptors include the same data type name. If they are row types, it must further be the case that the
declared types of their corresponding fields are pairwise compatible. If they are collection types, it must
further be the case that their element types are compatible. If they are reference types, it must further be the
case that their referenced types are compatible.
14 ©  ISO/IEC 2003 – All rights reserved

ISO/IEC 9075-2:1999/Cor.2:2003(E)
NOTE 1.1 — The data types "CHARACTER(n) CHARACTER SET CS1" and "CHARACTER(m) CHARACTER SET
CS2", where CS1 … CS2, have descriptors that include the same data type name (CHARACTER), but are not mutually
assignable; therefore, they are not compatible.
4.2 Character strings
1. Rationale: Clarify the distinction between character sets and character repertoires.
st nd
Replace the 1 and 2 paragraphs with:
A charac ter string is a sequ ence of ch aracters. All th e characters in a characte r string are take n from a sing le
character se t. A charac ter string has a le ngth, wh ich is the num ber of chara cters in the seq uence. Th e length is
0 (zero) or a positive integer.
A character type is described by a character type descriptor. A character type descriptor contains:
— The name of the specific character type (CHARACTE R, CHARAC TER VARY ING, and
CHARACTER LARGE OBJECT; NATIONAL CHARACTER, NATIONAL CHARACTER
VARYING, and NATIONAL CHARACTER LARGE OBJECT are represented as CHARACTER,
CHAR ACTE R VAR YING, an d CHA RACT ER LAR GE OB JECT, respectively).
— The length or maximum length in characters of the character type.
— The catalog name, schema name, and character set name of the character set of the character type.
— The catalog name, schema name, and collation name of the collation of the character type.
The character set of a character type may be specified explicitly or implicitly.
The s NAT IONA L CHA RAC TER are used to spe cify an imp lementation -defined ch aracter set.
Special syn tax (N'string') is pro vided for rep resenting literals in that characte r set.
With two exceptions, a character string expression is assignable only to sites of a character type whose
character set is the same. The exceptions are as specified in Subclause 4.2.4, "Universal character sets", and
such other cases as may be implementation-defined. If a store assignment would result in the loss of non-
characters due to truncation, then an exception condition is raised. If a retrieval assignment or
evaluation of a would result in the loss of characters due to truncation, then a warning
condition is raised.
Character sets fall into three categories: those defined by national or international standards, those defined by
SQL-implementations, and those defined by applications. The character sets defined by ISO/IEC 10646 and
The Unicode Standard are known as Univers al Chara cter Sets (UCS) a nd their treatm ent is describe d in
Subclau se 4.2.4, ''Unive rsal characte r sets''. Every char acter set con tains the cha racter (equiv alent to
U+0020). An application defines a character set by assigning a new name to a character set from one of the
first two categ ories. They can be de fined to ''reside'' in any sc hema ch osen by th e application . Characte r sets
defined by standards or by SQL-implementations reside in the Information Sche
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.

Loading comments...