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

XML Datatypes

Table 12–3 SQL/DS and DB2 Datatypes Converted to Oracle Datatypes

SQL/DS or DB2 Datatype

Oracle Datatype

 

 

CHARACTER(n)

CHAR(n)

VARCHAR(n)

VARCHAR(n)

LONG VARCHAR(n)

LONG

DECIMAL(p,s)a

NUMBER(p,s)

INTEGER

NUMBER(38)

SMALLINT

 

FLOAT(b)b

NUMBER

aThe DECIMAL datatype can specify only fixed-point numbers. For this datatype, s defaults to 0.

bThe FLOAT datatype is a floating-point number with a binary precision b. The default precision for this datatype is 126 binary, or 38 decimal.

Do not define columns with the following SQL/DS and DB2 datatypes, because they have no corresponding Oracle datatype:

GRAPHIC

LONG VARGRAPHIC

VARGRAPHIC

TIME

Note that data of type TIME can also be expressed as Oracle DATE data.

XML Datatypes

Oracle provides the XMLType datatype to handle XML data.

XMLType Datatype

XMLType can be used like any other user-defined type. XMLType can be used as the datatype of columns in tables and views. Variables of XMLType can be used in PL/SQL stored procedures as parameters, return values, and so on. You can also use XMLType in PL/SQL, SQL and Java, and through JDBC and OCI.

Native Datatypes 12-25

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