Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Semestr2 / 1 - Oracle / Oracle selected docs / SQL reference.pdf
Скачиваний:
24
Добавлен:
12.05.2015
Размер:
11.92 Mб
Скачать

FIPS Compliance

Oracle complied fully with last Federal Information Processing Standard (FIPS), which was FIPS PUB 127-2. That standard is no longer published. However, for users whose applications depend on information about the sizes of some database constructs that were defined in FIPS 127-2, we list the details of our compliance in Table B–5.

Table B–5 Sizing for Database Constructs

Database Constructs

FIPS

Oracle9i

 

 

 

Length of an identifier (in bytes)

18

30

 

 

 

Length of CHARACTER datatype (in bytes)

240

2000

 

 

 

Decimal precision of NUMERIC datatype

15

38

 

 

 

Decimal precision of DECIMAL datatype

15

38

 

 

 

Decimal precision of INTEGER datatype

9

38

 

 

 

Decimal precision of SMALLINT datatype

4

38

 

 

 

Binary precision of FLOAT datatype

20

126

 

 

 

Binary precision of REAL datatype

20

63

 

 

 

Binary precision of DOUBLE PRECISION datatype

30

126

 

 

 

Columns in a table

100

1000

 

 

 

Values in an INSERT statement

100

1000

 

 

 

SET clauses in an UPDATE statement(a)

20

1000

Length of a row(b,c)

2,000

2,000,000

Columns in a UNIQUE constraint

6

32

 

 

 

Length of a UNIQUE constraint(b)

120

(d)

Length of foreign key column list(b)

120

(d)

Columns in a GROUP BY clause

6

255(e)

Length of GROUP BY column list

120

(e)

 

 

 

Sort specifications in ORDER BY clause

6

255(e)

Length of ORDER BY column list

120

(e)

 

 

 

Columns in a referential integrity constraint

6

32

 

 

 

B-10 Oracle9i SQL Reference

Table B–5 (Cont.) Sizing for Database Constructs

Database Constructs

FIPS

Oracle9i

 

 

 

Tables referenced in a SQL statement

15

No limit

 

 

 

Cursors simultaneously open

10

(f)

 

 

 

Items in a SELECT list

100

1000

 

 

 

Notes to Table B–5:

(a)The number of SET clauses in an UPDATE statement refers to the number items separated by commas following the SET keyword.

(b)The FIPS PUB defines the length of a collection of columns to be the sum of: twice the number of columns, the length of each character column in bytes, decimal precision plus 1 of each exact numeric column, binary precision divided by 4 plus 1 of each approximate numeric column.

(c)The Oracle limit for the maximum row length is based on the maximum length of a row containing a LONG value of length 2 gigabytes and 999 VARCHAR2 values, each of length 4000 bytes: 2(254) + 231 + (999(4000)).

(d)The Oracle limit for a UNIQUE key is half the size of an Oracle data block (specified by the initialization parameter DB_BLOCK_SIZE) minus some overhead.

(e)Oracle places no limit on the number of columns in a GROUP BY clause or the number of sort specifications in an ORDER BY clause. However, the sum of the sizes of all the expressions in either a GROUP BY clause or an ORDER BY clause is limited to the size of an Oracle data block (specified by the initialization parameter DB_ BLOCK_SIZE) minus some overhead.

(f)The Oracle limit for the number of cursors simultaneously opened is specified by the initialization parameter OPEN_CURSORS. The maximum value of this parameter depends on the memory available on your operating system and exceeds 100 in all cases.

Oracle Extensions to Standard SQL

Oracle supports numerous features that extend beyond standard SQL. In your Oracle applications, you can use these extensions just as you can use Core SQL:1999.

Oracle and Standard SQL B-11

If you are concerned with the portability of your applications to other implementations of SQL, use Oracle’s FIPS Flagger to help identify the use of Oracle extensions to Entry SQL92 in your embedded SQL programs. The FIPS Flagger is part of the Oracle precompilers and the SQL*Module compiler.

See Also: Pro*COBOL Precompiler Programmer’s Guide and Pro*C/C++ Precompiler Programmer’s Guide for information on how to use the FIPS Flagger.

Character Set Support

Oracle supports most national, international, and vendor-specific encoded character set standards. A complete list of character sets supported by Oracle Appears in Appendix A, "Locale Data", in Oracle9i Database Globalization Support Guide.

Unicode is a universal encoded character set that lets you store information from any language using a single character set. Unicode is required by modern standards such as XML, Java, JavaScript, and LDAP. Unicode is compliant with ISO/IEC standard 10646. You can obtain a copy of ISO/IEC standard 10646 from this address:

International Organization for Standardization 1 Rue de Varembé

Case postale 56

CH-1211, Geneva 20, Switzerland Phone: +41.22.749.0111

Fax: +41.22.733.3430

Web site: http://www.iso.ch/

Oracle9i complies fully with Unicode 3.0, the third and most recent version of the Unicode standard. For up-to-date information on this standard, visit the Web site of the Unicode Consortium:

http://www.unicode.org

Oracle uses UTF-8 (8-bit) encoding by way of three database character sets, two for ASCII-based platforms (UTF8 and AL32UTF8) and one for EBCDIC platforms (UTFE). If you prefer to implement Unicode support incrementally, you can store Unicode data in either the UTF-16 or UTF-8 encoding form, in the national character set, for the SQL NCHAR datatypes (NCHAR, NVARCHAR2, and NCLOB).

See Also: Oracle9i Database Globalization Support Guide for details on Oracle character set support.

B-12 Oracle9i SQL Reference

C

Oracle Reserved Words

This appendix lists Oracle reserved words. Words followed by an asterisk (*) are also ANSI reserved words.

Note: In addition to the following reserved words, Oracle uses systemgenerated names beginning with "SYS_" for implicitly generated schema objects and subobjects. Oracle discourages you from using this prefix in the names you explicitly provide to your schema objects and subobjects to avoid possible conflict in name resolution.

ACCESS

ADD *

ALL *

ALTER *

AND *

ANY *

AS *

ASC *

AUDIT

BETWEEN *

BY *

CHAR *

CHECK *

CLUSTER

COLUMN

COMMENT

COMPRESS

CONNECT *

CREATE *

CURRENT *

Oracle Reserved Words C-1

DATE * DECIMAL * DEFAULT * DELETE * DESC * DISTINCT * DROP * ELSE * EXCLUSIVE EXISTS FILE FLOAT * FOR * FROM * GRANT * GROUP * HAVING * IDENTIFIED

IMMEDIATE * IN * INCREMENT INDEX INITIAL INSERT * INTEGER * INTERSECT * INTO *

IS * LEVEL * LIKE * LOCK LONG

MAXEXTENTS MINUS MLSLABEL MODE MODIFY NOAUDIT NOCOMPRESS NOT * NOWAIT

C-2 Oracle9i SQL Reference

NULL *

NUMBER

OF * OFFLINE ON * ONLINE OPTION * OR * ORDER * PCTFREE PRIOR *

PRIVILEGES * PUBLIC * RAW

RENAME RESOURCE REVOKE * ROW ROWID ROWNUM ROWS * SELECT * SESSION * SET * SHARE SIZE *

SMALLINT * START SUCCESSFUL SYNONYM SYSDATE TABLE * THEN *

TO * TRIGGER UID UNION * UNIQUE * UPDATE * USER * VALIDATE

Oracle Reserved Words C-3

VALUES * VARCHAR * VARCHAR2 VIEW * WHENEVER * WHERE WITH *

C-4 Oracle9i SQL Reference

D

Examples

The body of the SQL Reference contains examples for almost every reference topic. This appendix contains lengthy examples that are appropriate in the context of a single SQL statement. These examples are intended to provide uninterrupted the series of steps that you would use to take advantage of particular Oracle functionality. They do not replace the syntax diagrams and semantics found for each individual SQL statement in the body of the reference. Please use the crossreference provided to access additional information, such as privileges required and restrictions, as well as syntax.

This appendix contains the following sections:

Using Extensible Indexing

Using XML in SQL Statements

Examples D-1

Соседние файлы в папке Oracle selected docs