Aliases of Built-in Data Types
BIGINT
It is the 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 the 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 the same as NUMERIC.
Refer to NUMERIC.
DECIMAL
It is the same as NUMERIC.
Refer to NUMERIC.
DOUBLE
It is the same as FLOAT(53).
Refer to FLOAT.
DOUBLE PRECISION
It is the same as FLOAT(53).
Refer to FLOAT.
FLOAT
Refer to FLOAT.
FLOAT4
It is the same as FLOAT(24).
Refer to FLOAT.
FLOAT8
It is the same as FLOAT(53).
Refer to FLOAT.
INT
It is the same as NUMBER(10,0).
Refer to NUMBER.
INT2
It is the same as NUMBER(5,0).
Refer to NUMBER.
INT4
It is the same as NUMBER(10,0).
Refer to NUMBER.
INT8
It is the same as NUMBER(19,0).
Refer to NUMBER.
INTEGER
It is the same as NUMBER(10,0).
Refer to NUMBER.
INTERVAL
Refer to INTERVAL.
LONG BINARY VARYING
It is the same as BINARY LONG VARYING.
Refer to BINARY LONG VARYING.
LONG CHAR VARYING
It is the same as CHARACTER LONG VARYING.
Refer to CHARACTER LONG VARYING.
LONG CHARACTER VARYING
It is the same as CHARACTER LONG VARYING.
Refer to CHARACTER LONG VARYING.
LONG VARCHAR
It is the 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 the same as NUMBER(5,0).
Refer to NUMBER.
TIME
Refer to TIME.
TIMESTAMP
Refer to TIMESTAMP.
VARBINARY
It is the same as BINARY VARYING.
Refer to BINARY VARYING.
VARCHAR
It is the same as CHARACTER VARYING.
Refer to CHARACTER VARYING.
VARCHAR2
It is the same as CHARACTER VARYING.
Refer to CHARACTER VARYING.
BINARY
Syntax
BINARY [ (length) ]
Syntax Rules and Parameters
length: It refers to the length of the binary string.
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: The number of bytes corresponding to the length value
For More Information
Refer to the following.
BINARY VARYING
Syntax
BINARY VARYING (length)
Syntax Rules and Parameters
length: It refers to the maximum length of binary string.
Range: 1 ~ 4000
Description
A variable-length binary string is stored. • Storage size: The number of bytes of the binary string to be stored • Alias names: VARBINARY
For More Information
Refer to the following.
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: The number of bytes of the binary string to be stored • Alias names: LONG BINARY VARYING, LONG VARBINARY
It cannot be used as a column of the key, so there are the following limitations: • It can not be used as a key column of an index. • It can not be used in the expression of the ORDER BY clause. • It can not be used in the expression of the GROUP BY clause. • It can not be used in the expression of the DISTINCT clause. • It can not be used in the expression of the UNION, INTERSECT, or EXCEPT clauses.
For More Information
Refer to the following.
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 refers to 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 the same as CHARACTERS.
OCTETS
The number of bytes
BYTE is the same as OCTETS.
If omitted, the default is the property value of CHAR_LENGTH_UNITS set when the database is created.
Description
A fixed-length string is stored. If the length of the string to be stored is shorter than the specified length, whitespace characters are stored in the remaining space.
Storage size: The number of bytes corresponding to the length value
Alias name: CHAR
For More Information
Refer to the following.
CHARACTER VARYING
Syntax
CHARACTER VARYING ( length [ CHARACTERS | OCTETS | CHAR | BYTE ] )
Syntax Rules and Parameters
length: It refers to the string length.
Range: 1 ~ 4000
[ CHARACTERS | OCTETS | CHAR | BYTE ]: It is unit of length.
CHARACTERS
The number of characters
CHAR is the same as CHARACTERS.
OCTETS
The number of bytes
BYTE is the same as OCTETS.
If omitted, the default is the property value of CHAR_LENGTH_UNITS set when the database is created.
Description
The variable-length string is stored. • Storage size: The number of bytes of the string to be stored • Alias names: VARCHAR, VARCHAR2
For More Information
Refer to the following.
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: The number of 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 the following limitations: • It can not be used as a key column of an index. • It can not be used in the expression of the ORDER BY clause. • It can not be used in the expression of the GROUP BY clause. • It can not be used in the expression of the DISTINCT clause. • It can not be used in the expression of the UNION, INTERSECT, or EXCEPT clauses.
For More Information
Refer to the following.
DATE
Syntax
DATE
Description
It is a date type that includes YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND (excluding fractional seconds). • Value range: Date values between '4714-11-24 BC' and '9999-12-31 AD' • Storage size: 8 bytes
For More Information
Refer to the following.
FLOAT
Syntax
FLOAT[ ( precision ) ]
Syntax Rules and Parameters
precision: It refers to the binary precision of significant digits.
Precision range: 1 ~ 126
Default value: 126
Description
A floating-point value with binary precision is stored.
Exponential range: 1E-130 ~ 1E+125
Storage size: (number of digits in the integer part + 1) / 2 + (number of digits in the fractional part + 1) / 2 + 1 (for exponent and sign)
It has a binary precision value, unlike the NUMBER and 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 following.
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 for YEAR
Value range: 2 ~ 6
Default value: 2
INTERVAL MONTH [ ( leading_precision ) ]: A period of MONTH is stored.
leading_precision
The number of digits for 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 for YEAR
Value range: 2 ~ 6
Default value: 2
INTERVAL DAY [ ( leading_precision ) ]: A period of DAY is stored.
leading_precision
The number of digits for DAY
Value range: 2 ~ 6
Default value: 2
INTERVAL HOUR [ ( leading_precision ) ]: A period of HOUR is stored.
leading_precision
The number of digits for HOUR
Value range: 2 ~ 6
Default value: 2
INTERVAL MINUTE [ ( leading_precision ) ]: A period of MINUTE is stored.
leading_precision
The number of digits for 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 for SECOND
Value range: 2 ~ 6
Default value: 2
fractional_seconds_precision
The number of digits for 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 for 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 for 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 for DAY
Value range: 2 ~ 6
Default value: 2
fractional_seconds_precision
The number of digits for 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 for 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 for HOUR
Value range: 2 ~ 6
Default value: 2
fractional_seconds_precision
The number of digits for 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 for MINUTE
Value range: 2 ~ 6
Default value: 2
fractional_seconds_precision
The number of digits for fractional seconds
Value range: 0 ~ 6
Default value: 6
Description
INTERVAL types can be classified into two families—YEAR TO MONTH and DAY TO SECOND—based on the range of value representation, as follows.
YEAR TO MONTH family type: The storage size is 8 bytes.
INTERVAL YEAR
INTERVAL MONTH
INTERVAL YEAR TO MONTH
DAY TO SECOND family type: The 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 a number larger than the specified number of digits is entered in a field where leading_precision is specified, an error is returned. If a number larger than the specified number of digits is entered in a field where 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 (integer part) | 2 | 0 ~ 59 |
For More Information
Refer to Interval Literals.
NATIVE_BIGINT
Syntax
NATIVE_BIGINT
Description
A signed 8-byte integer is stored.
It is the same as the long long data type in C language (8 byte 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
A double-precision floating-point number (8 bytes) is stored.
It is the same as the double data type in C language.
Exponential range: 1E-307 ~ 1E+308
Storage size: 8 bytes
NATIVE_INTEGER
Syntax
NATIVE_INTEGER
Description
A signed 4-byte integer is stored.
It is the same as the integer data type in C language (4 bytes).
Value range: -2,147,483,648 ~ +2,147,483,647
Storage size: 4 bytes
NATIVE_REAL
Syntax
NATIVE_REAL
Description
A single-precision floating-point number (4 bytes) is stored.
It is the same as the float data type in C language.
Exponential range: 1E-37 ~ 1E+37
Storage size: 4 bytes
NATIVE_SMALLINT
Syntax
NATIVE_SMALLINT
Description
A signed 2-byte integer is stored.
It is the same as the short data type in 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 is stored without precision or scale.
Range of significant digits: 38
Exponential range: 1E-130 ~ 1E+125
It is equivalent to FLOAT (126).
NUMBER(precision): An integer with the specified number of significant digits (precision) is stored.
Precision range: 1 ~ 38
Scale value: 0
Unlike the FLOAT type, it has decimal precision.
It is equivalent to NUMBER(precision, 0) and NUMERIC(precision, 0).
NUMBER(precision, scale): A fixed-point number with the specified precision and scale is stored.
Precision range: 1 ~ 38
Scale range: -84 ~ 127
Unlike the FLOAT type, it has decimal precision.
It is equivalent to 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
The NUMBER type is similar to the NUMERIC type, but if both precision and scale are omitted, the NUMBER type stores a floating-point number without specified precision and scale.
NUMBER without precision, scale: A floating-point number
NUMERIC without precision, scale: A fixed-point number of NUMERIC(38, 0)
Storage size: (number of digits in the integer part + 1) / 2 + (number of digits in the fractional part + 1) / 2 + 1 (exponent, sign)
For More Information
Refer to the following.
NUMERIC
Syntax
NUMERIC [ ( precision [ , scale ] ) ]
Syntax Rules and Parameters
precision: It refers to the decimal precision of significant digits.
precision range: 1 ~ 38
Default value: 38
scale: It refers to the range of decimal precision.
scale range: -84 ~ 127
Default value: 0
Description
A fixed-point number with the specified precision and scale is stored.
If the precision and scale are omitted, it is interpreted as follows.
NUMERIC = NUMERIC(38,0)
NUMERIC(p) = NUMERIC(p,0)
The NUMBER type is similar to the NUMERIC type, but if both precision and scale are omitted, the NUMBER type stores a floating-point number without specified precision and scale.
NUMBER without precision, scale: A floating-point number
NUMERIC without precision, scale: A fixed-point number of NUMERIC(38,0)
Storage size: (number of digits in the integer part + 1) / 2 + (number of digits in the fractional part + 1) / 2 + 1 (exponent, sign)
For More Information
Refer to the following.
ROWID
Syntax
ROWID
Description
The ROWID type stores the record identifier (ROWID). A record identifier (ROWID) is the unique identification information for each record in the database. When querying the ROWID pseudo column, the corresponding record identifier (ROWID) value for each record can be obtained. This ROWID pseudo column has the ROWID data type.
The components of the ROWID type in a standalone system are as follows: • OBJECT_ID • TABLESPACE_ID • PAGE_ID • OFFSET within PAGE
The components of the ROWID type in a cluster system are as follows: • GRID_BLOCK_SEQUENCE • GRID_BLOCK_ID • MEMBER_ID • SHARD_ID
ROWID is stored in a base-64 value, which can include A ~ Z, a ~ z, 0 ~ 9, +, and /. The components of the ROWID can be obtained using ROWID-related functions.
• Storage size: 16 bytes
For More Information
Refer to the following.
TIME
Syntax
TIME [ ( fractional_seconds_precision ) ] [ WITH TIME ZONE | WITHOUT TIME ZONE ]
Syntax Rules and Parameters
fractional_seconds_precision: It refers to 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 the TIME ZONE value.
WITH TIME ZONE: The time that includes the time zone
WITHOUT TIME ZONE: The time that does not include the time zone
Default value: WITHOUT TIME ZONE
Description
The time, including 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 following.
TIMESTAMP
Syntax
TIMESTAMP [ ( fractional_seconds_precision ) ] [ WITH TIME ZONE | WITHOUT TIME ZONE ]
Syntax Rules and Parameters
fractional_seconds_precision: It refers to 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 the TIME ZONE value.
WITH TIME ZONE: The time that includes the time zone.
WITHOUT TIME ZONE: The time that does not include the time zone.
Default value: WITHOUT TIME ZONE
Description
The time, including 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 following.