Aliases of Built-in Data Types
BIGINT
It is as same as NUMBER(19,0).
Refer to NUMBER.
BINARY
Refer to BINARY.
BINARY VARYING
Refer to BINARY VARYING .
BINARY LONG VARYING
Refer to BINARY LONG VARYING .
BOOLEAN
Refer to BOOLEAN.
CHAR
It is as same as CHARACTER.
Refer to CHARACTER.
CHARACTER
Refer to CHARACTER.
CHARACTER VARYING
Refer to CHARACTER VARYING.
CHARACTER LONG VARYING
Refer to CHARACTER LONG VARYING.
DATE
Refer to DATE.
DEC
It is as same as NUMERIC.
Refer to NUMERIC.
DECIMAL
It is as same as NUMERIC.
Refer to NUMERIC.
DOUBLE
It is as same as FLOAT(53).
Refer to FLOAT.
DOUBLE PRECISION
It is as same as FLOAT(53).
Refer to FLOAT.
FLOAT
Refer to FLOAT.
FLOAT4
It is as same as FLOAT(24).
Refer to FLOAT.
FLOAT8
It is as same as FLOAT(53).
Refer to FLOAT.
INT
It is as same as NUMBER(10,0).
Refer to NUMBER.
INT2
It is as same as NUMBER(5,0).
Refer to NUMBER.
INT4
It is as same as NUMBER(10,0).
Refer to NUMBER.
INT8
It is as same as NUMBER(19,0).
Refer to NUMBER.
INTEGER
It is as same as NUMBER(10,0).
Refer to NUMBER.
INTERVAL
Refer to INTERVAL.
LONG BINARY VARYING
It is as same as BINARY LONG VARYING.
Refer to BINARY LONG VARYING.
LONG CHAR VARYING
It is as same as CHARACTER LONG VARYING.
Refer to CHARACTER LONG VARYING.
LONG CHARACTER VARYING
It is as same as CHARACTER LONG VARYING.
Refer to CHARACTER LONG VARYING.
LONG VARCHAR
It is as same as CHARACTER LONG VARYING.
Refer to CHARACTER LONG VARYING.
NATIVE_BIGINT
Refer to NATIVE_BIGINT.
NATIVE_DOUBLE
Refer to NATIVE_DOUBLE.
NATIVE_INTEGER
Refer to NATIVE_INTEGER.
NATIVE_REAL
Refer to NATIVE_REAL.
NATIVE_SMALLINT
Refer to NATIVE_SMALLINT.
NUMBER
Refer to NUMBER.
NUMERIC
Refer to NUMERIC.
ROWID
Refer to ROWID.
SMALLINT
It is as same as NUMBER(5,0).
Refer to NUMBER.
TIME
Refer to TIME.
TIMESTAMP
Refer to TIMESTAMP.
VARBINARY
It is as same as BINARY VARYING.
Refer to BINARY VARYING.
VARCHAR
It is as same as CHARACTER VARYING.
Refer to CHARACTER VARYING.
VARCHAR2
It is as same as CHARACTER VARYING.
Refer to CHARACTER VARYING.
BINARY
Syntax
BINARY [ (length) ]
Syntax Rules and Parameters
length: It is the binary string length.
Range: 1 ~ 2000
Default value: 1
Description
A fixed-length binary string is stored. If the binary string length to be stored is shorter than the specified length, X'00 ' is stored in the remaining part. • Storage size: Bytes of the length value
For More Information
Refer to the followings.
BINARY VARYING
Syntax
BINARY VARYING (length)
Syntax Rules and Parameters
length: It is the maximum length of binary string.
Range: 1 ~ 4000
Description
The variable-length binary string is stored. • Storage size: Bytes of the binary string to be stored • Alias names: VARBINARY
For More Information
Refer to the followings.
BINARY LONG VARYING
Syntax
BINARY LONG VARYING
Description
The value of the long variable binary string is stored. • Maximum storage size: 100 megabytes • Storage size: Bytes of the binary string to be stored • Alias names: LONG BINARY VARYING, LONG VARBINARY
It can not be used as a column of the key, so there are limitations as follows. • It can not be used as a key column of an index. • It can not be used as the expression of ORDER BY clause. • It can not be used as the expression of GROUP BY clause. • It can not be used as the expression of DISTINCT clause. • It can not be used as the expression of UNION, INTERSECT, EXCEPT clauses.
For More Information
Refer to the followings.
BOOLEAN
Syntax
BOOLEAN
Description
TRUE or FALSE is stored. • Storage size: 1 byte.
CHARACTER
Syntax
CHARACTER [ (length [ CHARACTERS | OCTETS | CHAR | BYTE ] ) ]
Syntax Rules and Parameters
length: It is the string length.
Range: 1 ~ 2000
Default value: 1
[ CHARACTERS | OCTETS | CHAR | BYTE ]: It is unit of length.
CHARACTERS
The number of characters
CHAR is as same as CHARACTERS.
OCTETS
The number of bytes
BYTE is as same as OCTETS.
If omitted, the default is the property value of CHAR_LENGTH_UNITS which is set when creating database.
Description
A fixed-length string is stored. If the length of the string to be stored is shorter than the specified length, white spaces are stored in the remaining part.
Storage size: Bytes of the length value
Alias name: CHAR
For More Information
Refer to the followings.
CHARACTER VARYING
Syntax
CHARACTER VARYING ( length [ CHARACTERS | OCTETS | CHAR | BYTE ] )
Syntax Rules and Parameters
length: It is the string length.
Range: 1 ~ 4000
[ CHARACTERS | OCTETS | CHAR | BYTE ]: It is unit of length.
CHARACTERS
The number of characters
CHAR is as same as CHARACTERS.
OCTETS
The number of bytes
BYTE is as same as OCTETS.
If omitted, the default is the property value of CHAR_LENGTH_UNITS which is set when creating database.
Description
The variable-length string is stored. • Storage size: Bytes of the string to be stored • Alias names: VARCHAR, VARCHAR2
For More Information
Refer to the followings.
CHARACTER LONG VARYING
Syntax
CHARACTER LONG VARYING
Description
The value of the long variable-length string is stored. • Maximum storage size: 100 megabytes • Storage size: Bytes of the string to be stored • Alias names: LONG CHARACTER VARYING, LONG CHAR VARYING, LONG VARCHAR
It can not be used as a column of the key, so there are limitations as follows. • It can not be used as a key column of an index. • It can not be used as the expression of ORDER BY clause. • It can not be used as the expression of GROUP BY clause. • It can not be used as the expression of DISTINCT clause. • It can not be used as the expression of UNION, INTERSECT, EXCEPT clauses.
For More Information
Refer to the followings.
DATE
Syntax
DATE
Description
It is the date type including YEAR, MONTH, DAY, HOUR, MINUTE and SECOND (excluding fractional seconds). • Value range: Date value between '4714-11-24 BC' and '9999-12-31 AD' • Storage size: 8 bytes
For More Information
Refer to the followings.
FLOAT
Syntax
FLOAT[ ( precision ) ]
Syntax Rules and Parameters
precision: It is the binary precision of significant digits.
Precision range: 1 ~ 126
Default value: 126
Description
The floating point value with a binary precision is stored.
Exponential range: 1E-130 ~ 1E+125
Storage size: (number of digits in integer part + 1) / 2 + (number of digits in fractional part + 1) / 2 + 1 (exponent, sign)
It has a binary precision value unlike NUMBER, NUMERIC types.
Alias names: REAL = FLOAT(24), DOUBLE = FLOAT(53), DOUBLE PRECISION = FLOAT(53), FLOAT4 = FLOAT(24), FLOAT8 = FLOAT(53).
For More Information
Refer to the followings.
INTERVAL
Syntax
<interval_type> ::=
INTERVAL YEAR [ ( leading_precision ) ]
| INTERVAL MONTH [ ( leading_precision ) ]
| INTERVAL DAY [ ( leading_precision ) ]
| INTERVAL HOUR [ ( leading_precision ) ]
| INTERVAL MINUTE [ ( leading_precision ) ]
| INTERVAL SECOND [ ( leading_precision [ , fractional_seconds_precision ] ) ]
| INTERVAL YEAR [ ( leading_precision ) ] TO MONTH
| INTERVAL DAY [ ( leading_precision ) ] TO HOUR
| INTERVAL DAY [ ( leading_precision ) ] TO MINUTE
| INTERVAL DAY [ ( leading_precision ) ] TO SECOND [ ( fractional_seconds_precision ) ]
| INTERVAL HOUR [ ( leading_precision ) ] TO MINUTE
| INTERVAL HOUR [ ( leading_precision ) ] TO SECOND [ ( fractional_seconds_precision ) ]
| INTERVAL MINUTE [ ( leading_precision ) ] TO SECOND [ ( fractional_seconds_precision ) ]Syntax Rules and Parameters
INTERVAL YEAR [ ( leading_precision ) ]: A period of YEAR is stored.
leading_precision
The number of digits in YEAR
Value range: 2 ~ 6
Default value: 2
INTERVAL MONTH [ ( leading_precision ) ]: A period of MONTH is stored.
leading_precision
The number of digits in MONTH
Value range: 2 ~ 6
Default value: 2
INTERVAL YEAR [ ( leading_precision ) ] TO MONTH: A period of YEAR and MONTH is stored.
leading_precision
The number of digits in YEAR
Value range: 2 ~ 6
Default value: 2
INTERVAL DAY [ ( leading_precision ) ]: A period of DAY is stored.
leading_precision
The number of digits in DAY
Value range: 2 ~ 6
Default value: 2
INTERVAL HOUR [ ( leading_precision ) ]: A period of HOUR is stored.
leading_precision
The number of digits in HOUR
Value range: 2 ~ 6
Default value: 2
INTERVAL MINUTE [ ( leading_precision ) ]: A period of MINUTE is stored.
leading_precision
The number of digits in MINUTE
Value range: 2 ~ 6
Default value: 2
INTERVAL SECOND [ ( leading_precision [ , fractional_seconds_precision ] ) ]: A period of SECOND is stored.
leading_precision
The number of digits in SECOND
Value range: 2 ~ 6
Default value: 2
fractional_seconds_precision
The number of digits in fractional seconds
Value range: 0 ~ 6
Default value: 6
INTERVAL DAY [ ( leading_precision ) ] TO HOUR: A period of DAY and HOUR is stored.
leading_precision
The number of digits in DAY
Value range: 2 ~ 6
Default value: 2
INTERVAL DAY [ ( leading_precision ) ] TO MINUTE: A period of DAY, HOUR, and MINUTE is stored.
leading_precision
The number of digits in DAY
Value range: 2 ~ 6
Default value: 2
INTERVAL DAY [ ( leading_precision ) ] TO SECOND [ ( fractional_seconds_precision ) ]: A period of DAY, HOUR, MINUTE, and SECOND is stored.
leading_precision
The number of digits in DAY
Value range: 2 ~ 6
Default value: 2
fractional_seconds_precision
The number of digits in fractional seconds
Value range: 0 ~ 6
Default value: 6
INTERVAL HOUR [ ( leading_precision ) ] TO MINUTE: A period of HOUR and MINUTE is stored.
leading_precision
The number of digits in HOUR
Value range: 2 ~ 6
Default value: 2
INTERVAL HOUR [ ( leading_precision ) ] TO SECOND [ ( fractional_seconds_precision ) ]: A period of HOUR, MINUTE and SECOND is stored.
leading_precision
The number of digits in HOUR
Value range: 2 ~ 6
Default value: 2
fractional_seconds_precision
The number of digits in fractional seconds
Value range: 0 ~ 6
Default value: 6
INTERVAL MINUTE [ ( leading_precision ) ] TO SECOND [ ( fractional_seconds_precision ) ]: A period of MINUTE and SECOND is stored.
leading_precision
The number of digits in MINUTE
Value range: 2 ~ 6
Default value: 2
fractional_seconds_precision
The number of digits in fractional seconds
Value range: 0 ~ 6
Default value: 6
Description
INTERVAL types are classified into YEAR TO MONTH family type and DAY TO SECOND family type depending on the range of value representation as follows.
YEAR TO MONTH family type: Its storage size is 8 bytes.
INTERVAL YEAR
INTERVAL MONTH
INTERVAL YEAR TO MONTH
DAY TO SECOND family type: Its storage size is 16 bytes.
INTERVAL DAY
INTERVAL HOUR
INTERVAL MINUTE
INTERVAL SECOND
INTERVAL DAY TO HOUR
INTERVAL DAY TO MINUTE
INTERVAL DAY TO SECOND
INTERVAL HOUR TO MINUTE
INTERVAL HOUR TO SECOND
INTERVAL MINUTE TO SECOND
If the number which is bigger than number of the specified digits is in the field to which the leading_precision is specified, then an error is returned. If the number which is bigger than number of the specified digits is in the field to which the fractional_seconds_precision is specified, it is rounded off.
Field | Precision | Value range |
|---|---|---|
MONTH | 2 | 0 ~ 11 |
HOUR | 2 | 0 ~ 23 |
MINUTE | 2 | 0 ~ 59 |
SECOND (interger part) | 2 | 0 ~ 59 |
For More Information
Refer to Interval Literals.
NATIVE_BIGINT
Syntax
NATIVE_BIGINT
Description
Signed 8-byte integer is stored.
It is as same as long long data type of C language (8 bytes integer).
Value range: -9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807
Storage size: 8 bytes
NATIVE_DOUBLE
Syntax
NATIVE_DOUBLE
Description
Double precision floating-point number (8 bytes) is stored.
It is as same as double data type of C language.
Exponential range: 1E-307 ~ 1E+308
Storage size: 8 bytes
NATIVE_INTEGER
Syntax
NATIVE_INTEGER
Description
Signed 4 byte integer is stored.
It is as same as integer data type of C language (4 bytes).
Value range: -2,147,483,648 ~ +2,147,483,647
Storage size: 4 bytes
NATIVE_REAL
Syntax
NATIVE_REAL
Description
Single precision floating-point number (4 bytes) is stored.
It is as same as float data type of C language.
Exponential range: 1E-37 ~ 1E+37
Storage size: 4 bytes
NATIVE_SMALLINT
Syntax
NATIVE_SMALLINT
Description
Signed 2 byte integer is stored.
It is as same as short data type of C language.
Value range: -32,768 ~ 32,767
Storage size: 2 bytes
NUMBER
Syntax
NUMBER [ ( precision [ , scale ] ) ]
Syntax Rules and Parameters
NUMBER: A floating point number without a precision and scale is stored.
The range of significant digits: 38
Exponential range: 1E-130 ~ 1E+125
It is as same as FLOAT (126).
NUMBER(precision): The integer with significant digits of precision is stored.
Precision range: 1 ~ 38
The scale value: 0
It has a decimal precision value unlike FLOAT type.
It is as same as NUMBER(precision, 0), NUMERIC(precision, 0).
NUMBER(precision, scale): A fixed point number with precision and scale is stored.
Precision range: 1 ~ 38
Scale range: -84 ~ 127
It has a decimal precision value unlike FLOAT type.
It is as same as NUMERIC (precision,scale).
Alias names: SMALLINT = NUMBER(5,0), INTEGER = NUMBER(10,0), BIGINT = NUMBER(19,0), INT2 = NUMBER(5,0), INT4 = NUMBER(10,0), INT8 = NUMBER(19,0)
Description
NUMBER type is similar to NUMERIC type, but if both the precision and scale are omitted, NUMBER type stores the floating point number whose precision and scale are not specified.
NUMBER without precision, scale: Floating-point number
NUMERIC without precision, scale: The fixed point number of NUMERIC(38, 0)
Storage size: (number of digits in integer part + 1) / 2 + (number of digits in fractional part + 1) / 2 + 1 (exponent, sign)
For More Information
Refer to the followings.
NUMERIC
Syntax
NUMERIC [ ( precision [ , scale ] ) ]
Syntax Rules and Parameters
precision: It is the decimal precision of significant digits.
precision range: 1 ~ 38
Default value: 38
scale: It is the decimal point range.
scale range: -84 ~ 127
Default value: 0
Description
A fixed point number with precision and scale is stored.
If the precision and scale are omitted, it means as follows.
NUMERIC = NUMERIC(38,0)
NUMERIC(p) = NUMERIC(p,0)
NUMBER type is similar to NUMERIC type, but if both the precision and scale are omitted, NUMBER type stores the floating-point number whose precision and scale are not specified.
NUMBER without precision, scale: Floating point number
NUMERIC without precision, scale: Fixed point number of NUMERIC(38,0)
Storage size: (number of digits in integer part + 1) / 2 + (number of digits in fractional part + 1) / 2 + 1 (exponent, sign)
For More Information
Refer to the followings.
ROWID
Syntax
ROWID
Description
A record identifier (ROWID) is stored. A record identifier (ROWID) is the identification information of each record in database. When querying the ROWID pseudo column, each record identifier (ROWID) is obtained. This ROWID pseudo column has the ROWID data type information.
ROWID type consists of the followings in a stand-alone system. • OBJECT_ID • TABLESPACE_ID • PAGE_ID • OFFSET within PAGE
ROWID type consists of the followings in a cluster system. • GRID_BLOCK_SEQUENCE • GRID_BLOCK_ID • MEMBER_ID • SHARD_ID
ROWID is stored in the base 64 value, which can include A ~ Z, a ~ z, 0 ~ 9, +, /. Each component information of ROWID is obtained using ROWID-related functions.
• Storage size: 16 bytes
For More Information
Refer to the followings.
TIME
Syntax
TIME [ ( fractional_seconds_precision ) ] [ WITH TIME ZONE | WITHOUT TIME ZONE ]
Syntax Rules and Parameters
fractional_seconds_precision: It is the number of significant digits in fractional seconds.
fractional_seconds_precision range: 0 ~ 6
Default value: 6
[ WITH TIME ZONE | WITHOUT TIME ZONE ]: It specifies whether to store TIME ZONE value.
WITH TIME ZONE: The time which includes time zone
WITHOUT TIME ZONE: The time which does not include time zone
Default value: WITHOUT TIME ZONE
Description
The time which includes HOUR, MINUTE and SECOND is stored.
Storage size
TIME WITHOUT TIME ZONE: 8 bytes
TIME WITH TIME ZONE: 12 bytes
For More Information
Refer to the followings.
TIMESTAMP
Syntax
TIMESTAMP [ ( fractional_seconds_precision ) ] [ WITH TIME ZONE | WITHOUT TIME ZONE ]
Syntax Rules and Parameters
fractional_seconds_precision: It is the number of significant digits in the fractional seconds.
fractional_seconds_precision range: 0 ~ 6
Default value: 6
[ WITH TIME ZONE | WITHOUT TIME ZONE ]: It specifies whether to store TIME ZONE value.
WITH TIME ZONE: The time which includes time zone.
WITHOUT TIME ZONE: The time which does not include time zone.
Default value: WITHOUT TIME ZONE
Description
The time which includes YEAR, MONTH, DATE, HOUR, MINUTE and SECOND is stored.
Storage size
TIMESTAMP WITHOUT TIME ZONE: 8 bytes
TIMESTAMP WITH TIME ZONE: 12 bytes
For More Information
Refer to the followings.