data type | compatibility | deskripsi | range | bytes |
BOOLEAN | boolean | true and false | 1 | |
BIT | intege | 0 and 1 | 1 | |
TINYINT | BYTE | integer | 0 to 255 | 1 |
SMALLINT | integer | -32768 to 32767 | 2 | |
INT | COUNTER (INT IDENTITY) SERIAL (INT IDENTITY) | integer | -2147483648 to 2147483647 | 4 |
BIGINT | integer | -9223372036854775808 to 9223372036854775807 | 8 | |
REAL | floating point | -3.40E+38 to 3.40E+38 | 4 | |
DOUBLE | floating point | -1.79E+308 to 1.79E+308 | 8 | |
FLOAT | like DOUBLE | |||
MONEY | fixed point with a scale 4 | -922,337,203,685,477.5808 to + 922,337,203,685,477.580 | 8 | |
SMALLMONEY | fixed point with a scale 4 | -214,748.3648 to 214,748.3647 | 4 | |
NUMERIC[(p[,s])] | NUMBER [(p[,s])] VARNUM [(p[,s])] | fixed point with a variable precision and scale p – precision s – scale | precision 1-9 10-19 20-29 30-3 | – 6 10 14 18 |
DECIMAL[(p[,s])] | like NUMERIC | |||
CHAR[(n)] | CHARACTER[(n)] | n – length | 1 to 6553 | 2+2*n |
NCAHAR[(n)] | n – length | 1 to 6553 | 2+2*n | |
VARCHAR[(n)] | VARCHAR2[(n)] | n – length | 0 to 65535 | variable 2 to 2 + 2*n |
NVARCHAR[(n)] | NVARCHAR2[(n)] | n – length | 0 to 65535 | variable 2 to 2 + 2*n |
LONGVARCHAR | TEXTLONG | 0 to 2,147,483,647 | 12+2*n | |
LONGNVARCHAR | NTEXT | 0 to 2,147,483,647 | 12+2*n | |
CLOB | 0 to 2,147,483,647 | 12+2*n | ||
NCLOB | 0 to 2,147,483,647 | 12+2*n | ||
BINARY[(n)] | 1 to 65535 | 2+n | ||
VARBINARY[(n)] | RAW | variable length binary data | 1 to 65535 | variable 2 to 2+n |
LONGVARBINARY | IMAGELONG RAW | variable length large binary data | 0 to 2,147,483,647 | 12+n |
BLOB | large binary data with handle | 0 to 2,147,483,647 | 12+n | |
DATE | date | 4 | ||
TIME | time | 4 | ||
TIMESTAMP | DATETIME | timestamp | 8 | |
SMALLDATETIME | date and time with a precision of a minute | 4 | ||
UNIQUEIDENTIFIER | 16 byte unique identifier | 16 | ||
JAVA_OBJECT | SQL_VARIANT | any Java object | 0 to 2,147,483,647 | variable |