Соответствие типов данных для СУБД SQL
Логический тип данных | AS/400 | DB/2 | Informix | Ingres |
Long integer #1 | INTEGER* | INTEGER* | integer* | integer* |
Long integer #2 | INTEGER | INTEGER | int* | integer |
Long integer #3 | INTEGER | INTEGER | int | integer4* |
Boolean | SMALLINT | SMALLINT | byte | integer1 |
Bit | SMALLINT | SMALLINT | byte | integer1 |
Byte | SMALLINT | SMALLINT | byte* | integer1* |
Short integer #1 | SMALLINT* | SMALLINT* | smallint* | smallint* |
Short integer #2 | SMALLINT | SMALLINT | smallint | integer2* |
Quad Word (RDB 'QUADWORD') | FLOAT | FLOAT | numeric() | float8 |
Big Integer (RDB 'BIGINT') | FLOAT | FLOAT | numeric() | float8 |
Decimal | DECIMAL()* | DECIMAL()* | decimal()* | float |
Number #1 | DECIMAL() | DECIMAL() | dec()* | float |
Number #2 | DECIMAL() | DECIMAL() | numeric()* | float |
Money | DECIMAL() | DECIMAL() | money()* | money* |
Short Money | DECIMAL() | DECIMAL() | money() | money |
Small Float (Ingres 'smallfloat') | REAL | REAL | smallfloat* | float4 |
Real | REAL* | REAL* | real* | float4* |
Float #1 | FLOAT* | FLOAT* | double precision* | float8* |
Float #2 | FLOAT | FLOAT | interval* | float8 |
Long Float (Sybase 'double precision') | DOUBLE PRECISION | FLOAT | double precision* | float8* |
Interval | FLOAT | FLOAT | interval()* | float8 |
Id | INTEGER | INTEGER | serial* | integer |
Character #1 | CHAR() | CHAR() | char() | c()* |
Character #2 | CHARACTER()* | CHARACTER()* | character()* | char() |
Character #3 | CHAR()* | CHAR()* | char()* | char()* |
Variable Char. #1 | VARCHAR()* | VARCHAR()* | varchar()* | varchar()* |
Variable Char. #2 | VARCHAR() | VARCHAR() | varchar() | varchar() |
Text #1 | VARCHAR() | LONG VARCHAR* | text | varchar() |
Text #2 | VARCHAR() | LONG VARCHAR | text | varchar() |
Text #3 | VARCHAR() | LONG VARCHAR | text | varchar() |
Text #4 | VARCHAR() | LONG VARCHAR | text* | text()* |
Text #5 | VARCHAR() | LONG VARCHAR | text in table* | text() |
Date | DATE* | DATE* | date* | date* |
Time | TIME* | TIME* | datetime | date |
Time Stamp | TIMESTAMP* | TIMESTAMP* | datetime | date |
Date/Time | DATE | DATE | datetime* | date |
Small Date/Time | TIMESTAMP | DATE | datetime | date |