SQL type identifier [1]
|
Typical SQL data type [2]
|
Typical type description
|
---|---|---|
SQL_CHAR
|
CHAR(n)
|
Character string of fixed string length n.
|
SQL_VARCHAR
|
VARCHAR(n)
|
Variable-length character string with a maximum string length n.
|
SQL_LONGVARCHAR
|
LONG VARCHAR
|
Variable length character data. Maximum length is data source-dependent. [3]
|
SQL_WCHAR
|
WCHAR(n)
|
Unicode character string of fixed string length n.
|
SQL_WVARCHAR
|
VARWCHAR(n)
|
Unicode variable-length character string with a maximum string length n.
|
SQL_WLONGVARCHAR
|
LONGWVARCHAR
|
Unicode variable-length character data. Maximum length is data source-dependent.
|
SQL_DECIMAL
|
DECIMAL(p, s)
|
Signed, exact, numeric value with a precision p and scale s. (The maximum precision is driver-defined.)
(1 <= p <= 16; s <= p). [4]
|
SQL_NUMERIC
|
NUMERIC(p,s)
|
Signed, exact, numeric value with a precision p and scale s.
(1 <= p <= 16; s <= p). [4]
|
SQL_SMALLINT
|
SMALLINT
|
Exact numeric value with precision 5 and scale 0.
(signed: -32,768 <=n <= 32,767, unsigned: 0 <= n <= 65,535)
solidDB® supports only signed, not unsigned, SMALLINT. [5]
|
SQL_INTEGER
|
INTEGER
|
Exact numeric value with precision 10 and scale 0. (signed: -231 <= n <= 231 -1, unsigned: 0 <= n <= 232 -1) solidDB® supports only signed, not unsigned, INTEGER. [5]
|
SQL_REAL
|
REAL
|
Signed, approximate, numeric value with a binary precision 24 (zero or absolute value 10-38 to 1038).
|
SQL_FLOAT
|
FLOAT(p)
|
Signed, approximate, numeric value with a binary precision of at least p. (The maximum precision is driver defined.) [6]
|
SQL_DOUBLE
|
DOUBLE PRECISION
|
Signed, approximate, numeric value with a binary precision 53 (zero or absolute value 10-308 to 10 308).
|
SQL_BIT
|
BIT
|
Single bit binary data.
solidDB® does not support BIT/SQL_BIT. [7]
|
SQL_TINYINT
|
TINYINT
|
Exact numeric value with precision 3 and scale 0 (signed:-128 <= n <= 127 unsigned: 0 <= n <= 255) solidDB® supports only signed, not unsigned, TINYINT. [5]
|
SQL_BIGINT
|
BIGINT
|
Exact numeric value with precision 19 (if signed) or 20 (if unsigned) and scale 0 (signed: -263 <= n <= 263 -1, unsigned: 0 <= n <= 264 - 1)
|
SQL_BINARY
|
BINARY(n)
|
Binary data of fixed length n. [3]
|
SQL_VARBINARY
|
VARBINARY(n)
|
Variable length binary data of maximum length n. The maximum is set by the user. [3]
|
SQL_LONGVARBINARY
|
LONG VARBINARY
|
Variable length binary data. Maximum length is data source-dependent. [3]
|
SQL_TYPE_DATE [8]
|
DATE
|
Year, month, and day fields, conforming to the rules of the Gregorian calendar. (See Constraints of the Gregorian calendar.)
|
SQL_TYPE_TIME [8]
|
TIME(p)
|
Hour, minute, and second fields. Valid values for hours are 00 to 23. Valid values for minutes are 00 to 59. Valid values for seconds are 00 to 61 (60 and 61 are to handle “leap seconds” (see http://tycho.usno.navy.mil/leapsec.html). Precision p indicates the precision of the seconds field.
|
SQL_TYPE_TIMESTAMP [8]
|
TIMESTAMP(p)
|
Year, month, day, hour, minute, and send fields, with valid values as defined for the DATE and Time data types.
|
TYPE_
|
DATA_TYPE
|
COLUMN_ SIZE
|
LITERAL_ PREFIX
|
LITERAL_ SUFFIX
|
CREATE_ PARAMS
|
NULLABLE
|
---|---|---|---|---|---|---|
"char"
|
SQL_CHAR
|
255
|
„„
|
„„
|
"length"
|
SQL_TRUE
|
"text"
|
SQL_LONG VARCHAR
|
2147483647
|
„„
|
„„
|
<Null>
|
SQL_TRUE
|
"decimal"
|
SQL_DECIMAL
|
18 [1]
|
<Null>
|
<Null>
|
"precision, scale"
|
SQL_TRUE
|
"real"
|
SQL_REAL
|
7
|
<Null>
|
<Null>
|
<Null>
|
SQL_TRUE
|
"datetime"
|
SQL_TYPE_ TIMESTAMP
|
29 [2]
|
„„
|
„„
|
<Null>
|
SQL_TRUE
|
SQL_CHAR
|
SQL_FALSE
|
SQL_ SEARCHABLE
|
<Null>
|
SQL_FALSE
|
<Null>
|
"char"
|
SQL_LONG VARCHAR
|
SQL_FALSE
|
SQL_PRED_ CHAR
|
<Null>
|
SQL_FALSE
|
<Null>
|
"text"
|
SQL_DECIMAL
|
SQL_FALSE
|
SQL_PRED_ BASIC
|
SQL_FALSE
|
SQL_FALSE
|
SQL_FALSE
|
"decimal"
|
SQL_REAL
|
SQL_FALSE
|
SQL_PRED_ BASIC
|
SQL_FALSE
|
SQL_FALSE
|
SQL_FALSE
|
"real"
|
SQL_TYPE_ TIMESTAMP
|
SQL_FALSE
|
SQL_ SEARCHABLE
|
<Null>
|
SQL_FALSE
|
<Null>
|
"datetime"
|
SQL_CHAR
|
<Null>
|
<Null>
|
SQL_CHAR
|
<Null>
|
<Null>
|
<Null>
|
SQL_LONG VARCHAR
|
<Null>
|
<Null>
|
SQL_LONG VARCHAR
|
<Null>
|
<Null>
|
<Null>
|
SQL_DECIMAL
|
0
|
16
|
SQL_ DECIMAL
|
<Null>
|
10
|
<Null>
|
SQL_REAL
|
<Null>
|
<Null>
|
SQL_REAL
|
<Null>
|
10
|
<Null>
|
SQL_TYPE_ TIMESTAMP
|
3
|
3
|
SQL_ DATETIME
|
SQL_CODE_ TIMESTAMP
|
<Null>
|
12
|