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

What’s New in SQL Reference?

This section describes new features of Oracle9i release 2 and provides pointers to additional information. New features information from previous releases is also retained to help those users upgrading to the current release.

The following sections describe the new features in the Oracle9i SQL Reference:

Oracle9i Release 2 (9.2) New Features in the SQL Reference

Oracle9i Release 1 (9.0.1) New Features in the SQL Reference

Oracle8i New Features in SQL Reference

xxvii

Oracle9i Release 2 (9.2) New Features in the SQL Reference

The following built-in conditions are new to this release:

EQUALS_PATH on page 5-13

UNDER_PATH on page 5-20

The following built-in expression is enhanced in this release:

The syntax for type constructor expressions now allows creation of new user-defined constructors (see "Type Constructor Expressions" on page 4-13).

The following built-in functions are new to this release:

DEPTH on page 6-57

EXTRACTVALUE on page 6-66

PATH on page 6-115

UPDATEXML on page 6-197

XMLAGG on page 6-210

XMLCONCAT on page 6-213

XMLCOLATTVAL on page 6-212

XMLELEMENT on page 6-214

XMLFOREST on page 6-217

XMLSEQUENCE on page 6-218

XMLTRANSFORM on page 6-219

The following privileges are new or enhanced in this release:

DEBUG CONNECT SESSION system privilege on page 17-37 (new)

DEBUG ANY PROCEDURE system privilege on page 17-37 (new)

DEBUG object privilege on page 17-46 (new)

EXECUTE object privilege on procedures, packages, libraries, and object types (enhanced)

GRANT ANY OBJECT PRIVILEGE system privilege on page 17-44

The following top-level SQL statements are new or enhanced in this release:

xxviii

ALTER DATABASE on page 9-11 has new syntax for managing standby databases, for managed standby recovery, and for logical standby.

ALTER OPERATOR on page 9-117 lets you recompile an existing user-defined operator.

ALTER TABLE on page 11-2 contains new clauses that let you rename a column or a constraint.

CREATE DATABASE on page 13-23:

Contains two new clauses for assigning passwords to the SYS and SYSTEM users

Lets you create a locally managed SYSTEM tablespace

CREATE SYNONYM on page 15-2 now allows creation of synonyms for object types.

CREATE TABLE on page 15-7:

Allows creation of a default list partition to capture rows that do not fall within any of the other list partitions

Allows creation of range-list composite-partitioned tables

Contains syntax for creating a table of type XMLType and for creating range-list composite-partitioned tables

Allows data compression of data in table and partition segments

CREATE TYPE on page 16-3 allows creation of object types with of NCHAR, NVARCHAR2, and NCLOB attributes.

CREATE VIEW on page 16-39 now contains syntax for creating an XML view by transforming a table of type XMLType.

SELECT on page 18-4 provides syntax for "flashback queries", which let you query data at a specified system change number or time in the past.

Oracle9i Release 1 (9.0.1) New Features in the SQL Reference

The following built-in datatypes were new or modified in this release:

Oracle provides SQL-based interfaces for defining new types when the built-in or ANSI-supported types are not sufficient. See "Oracle-Supplied Types" on page 2-40.

xxix

"CHAR Datatype" on page 2-10 can take the CHAR or BYTE parameter to indicate character or byte semantics, respectively.

"INTERVAL YEAR TO MONTH Datatype" on page 2-24 and "INTERVAL DAY TO SECOND Datatype" on page 2-24 are provided for additional datetime functionality

"TIMESTAMP Datatype" on page 2-21 is provided for additional datetime functionality.

"VARCHAR2 Datatype" on page 2-11 can take the CHAR or BYTE parameter to indicate character or byte semantics, respectively.

The following expression forms were new or enhanced in this release:

"CASE Expressions" on page 4-6 (enhanced with searched case expression)

"CURSOR Expressions" on page 4-7 (enhanced; they can be passed as REF CURSOR arguments to functions)

"Datetime Expressions" on page 4-9 (new)

"INTERVAL Expressions" on page 4-11 (new)

"Scalar Subquery Expressions" on page 4-13 (new)

The following condition was new in this release:

IS OF type Conditions on page 5-19

The following built-in functions were new to this release:

ASCIISTR on page 6-19

BIN_TO_NUM on page 6-25

COALESCE on page 6-33

COMPOSE on page 6-34

CURRENT_DATE on page 6-49

CURRENT_TIMESTAMP on page 6-50

DBTIMEZONE on page 6-51

DECOMPOSE on page 6-53

EXISTSNODE on page 6-61

EXTRACT (datetime) on page 6-63

EXTRACT (XML) on page 6-65

xxx

FIRST on page 6-67

FROM_TZ on page 6-71

GROUP_ID on page 6-72

GROUPING_ID on page 6-75

LAST on page 6-81

LOCALTIMESTAMP on page 6-90

NULLIF on page 6-110

PERCENTILE_CONT on page 6-118

PERCENTILE_DISC on page 6-121

RAWTONHEX on page 6-126

ROWIDTONCHAR on page 6-141

SESSIONTIMEZONE on page 6-143

SYS_CONNECT_BY_PATH on page 6-155

SYS_DBURIGEN on page 6-161

SYS_EXTRACT_UTC on page 6-162

SYS_XMLAGG on page 6-165

SYS_XMLGEN on page 6-166

SYSTIMESTAMP on page 6-168

TO_CHAR (character) on page 6-170

TO_CLOB on page 6-175

TO_DSINTERVAL on page 6-177

TO_NCHAR (character) on page 6-180

TO_NCHAR (datetime) on page 6-181

TO_NCHAR (number) on page 6-182

TO_NCLOB on page 6-182

TO_TIMESTAMP on page 6-185

TO_TIMESTAMP_TZ on page 6-186

TO_YMINTERVAL on page 6-187

xxxi

TREAT on page 6-191

TZ_OFFSET on page 6-195

UNISTR on page 6-196

WIDTH_BUCKET on page 6-208

The following functions were enhanced for this release:

INSTR on page 6-78

LENGTH on page 6-88

SUBSTR on page 6-152

The following privileges were new to this release:

EXEMPT ACCESS POLICY system privilege on page 17-44

RESUMABLE system privilege on page 17-44

SELECT ANY DICTIONARY system privilege on page 17-44

UNDER

ANY

TYPE system privilege on page 17-42

UNDER

ANY

VIEW system privilege on page 17-43

UNDER object privilege on page 17-46

The following top-level SQL statements were new to this release:

CREATE PFILE on page 14-62

CREATE SPFILE on page 14-94

MERGE on page 17-77

The following SQL statements had new syntax:

ALTER DATABASE on page 9-11 has new syntax that lets you end a "hot backup" procedure while the database is mounted. It also has new syntax related to standby databases.

ALTER INDEX on page 9-62 lets you gather statistics on index usage.

ALTER OUTLINE on page 9-118 allows modification of both public and private outlines.

ALTER ROLE on page 9-134 lets you identify a role using an application-specified package.

xxxii

ALTER SESSION on page 10-2 lets you specify whether statements issued during the session can be suspended under some conditions.

ALTER SYSTEM on page 10-20 has extended SET clause and new RESET clause; lets you put the database in quiesed state.

ALTER TABLE on page 11-2 allows partitioning by a list of specified values.

ALTER TYPE on page 12-6 lets you modify the attribute or method definition of an object type.

ALTER VIEW on page 12-31 lets you add constraints to views.

ANALYZE on page 12-34 now has ONLINE and OFFLINE clauses as part of the VALIDATE STRUCTURE syntax. In addition, you can now choose whether to collect standard statistics, user-defined statistics, or both.

constraints on page 7-5 has been enhanced to facilitate index handling when dropping or disabling constraints.

CREATE CONTEXT on page 13-12 has added syntax to let you initialize the context from the LDAP directory or from an OCI interface and to make the context accessible throughout an instance.

CREATE CONTROLFILE on page 13-15 allows creation of Oracle-managed files.

CREATE DATABASE on page 13-23 lets you create default temporary tablespaces when you create the database; lets you create undo tablespaces.

CREATE FUNCTION on page 13-52 lets you create pipelined and parallel table functions and user-defined aggregate functions.

CREATE OUTLINE on page 14-48 allows creation of both public and private outlines.

CREATE ROLE on page 14-79 lets you identify a role using an application-specified package.

CREATE TABLE on page 15-7 allows creation of external tables (tables whose data is outside the database); allows creation of Oracle-managed files; allows partitioning by a list of specified values.

CREATE TABLESPACE on page 15-80 allows for segment space management by bitmaps as well as by free lists; allows creation of Oracle-managed files; lets you create undo tablespaces.

CREATE TEMPORARY TABLESPACE on page 15-92 allows creation of Oracle-managed files.

xxxiii

CREATE TYPE on page 16-3 lets you create subtypes.

CREATE VIEW on page 16-39 lets you create subviews of object views; lets you define constraints on views.

DROP TABLESPACE on page 17-10 has added syntax that lets you drop operating system files when you drop the contents from a dropped tablespace.

file_specification on page 7-39 allows creation of Oracle-managed files.

INSERT on page 17-53 has added syntax that lets you insert default column values.

SELECT on page 18-4 lets you specify multiple groupings in the GROUP BY clause, for selective analysis across multiple dimensions; lets you assign names to subquery blocks; has new ANSI-compliant join syntax.

SET TRANSACTION on page 18-50 lets you specify a name for a transaction.

UPDATE on page 18-59 has added syntax that lets you update to default column values.

Oracle8i New Features in SQL Reference

The following SQL functions were new to this version:

BITAND on page 6-25

CORR on page 6-37

COVAR_POP on page 6-42

COVAR_SAMP on page 6-44

CUME_DIST on page 6-47

DENSE_RANK on page 6-55

FIRST_VALUE on page 6-69

LAG on page 6-80

LAST_VALUE on page 6-84

LEAD on page 6-86

NTILE on page 6-109

NUMTOYMINTERVAL on page 6-112

NUMTODSINTERVAL on page 6-111

xxxiv

NVL2 on page 6-114

PERCENT_RANK on page 6-116

RANK on page 6-123

RATIO_TO_REPORT on page 6-125

REGR_ (Linear Regression) Functions on page 6-129

STDDEV_POP on page 6-149

STDDEV_SAMP on page 6-151

VAR_POP on page 6-202

VAR_SAMP on page 6-204

The following top-level SQL statements were new to Release 8.1.5:

ALTER DIMENSION on page 9-56

ALTER JAVA on page 9-87

ALTER OUTLINE on page 9-118

ASSOCIATE STATISTICS on page 12-50

CALL on page 12-68

CREATE CONTEXT on page 13-12

CREATE DIMENSION on page 13-43

CREATE INDEXTYPE on page 13-95

CREATE JAVA on page 13-98

CREATE OPERATOR on page 14-44

CREATE OUTLINE on page 14-48

CREATE TEMPORARY TABLESPACE on page 15-92

DISASSOCIATE STATISTICS on page 16-64

DROP CONTEXT on page 16-69

DROP DIMENSION on page 16-72

DROP INDEXTYPE on page 16-79

DROP JAVA on page 16-81

DROP OPERATOR on page 16-88

xxxv

DROP OUTLINE on page 16-90

In addition, the following features were enhanced:

The aggregate functions have expanded functionality. See "Aggregate Functions" on page 6-8.

When specifying LOB storage parameters, you can now specify caching of LOBs for read-only purposes. See CREATE TABLE on page 15-7.

The section on Expressions now contains a new expression. See "CASE Expressions" on page 4-6.

Subqueries can now be unnested. See "Unnesting of Nested Subqueries" on page 8-15.

xxxvi

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