db2 | interbase | msaccess | mssql | oracle | informix | postgreSQL1 | sybase1 | nsdb1 |
---|---|---|---|---|---|---|---|---|
boolean | ||||||||
CHAR(1)2 | CHAR(1)2 | CHAR(1)2 | CHAR(1)2 | CHAR(1)2 | CHAR(1)2 | CHAR(1) | CHAR(1) | CHAR(1) |
char | ||||||||
CHAR(1) | CHAR(1) | CHAR(1) | CHAR(1) | CHAR(1) | CHAR(1) | CHAR(1) | - | - |
byte | ||||||||
SMALLINT | SMALLINT | SMALLINT | SMALLINT | NUMBER(3) | SMALLINT | INT2 | - | - |
short | ||||||||
SMALLINT | SMALLINT | SMALLINT | SMALLINT | NUMBER(5) | INTEGER | INT2 | - | - |
int | ||||||||
INTEGER | INTEGER | INTEGER | INT | NUMBER(10) | INT8 | INT4 | INTEGER | INTEGER |
long | ||||||||
BIGINT | CHAR(20)3,4 | CURRENCY3,5 | DECIMAL(19,0)6 | NUMBER(20) | CHAR(20)3,4 | INT8 | - | - |
float | ||||||||
FLOAT7,8 | DOUBLE PRECISION |
DOUBLE | FLOAT8 | NUMBER7,8 | FLOAT8 | FLOAT8 | - | - |
double | ||||||||
FLOAT7,8 | DOUBLE PRECISION |
DOUBLE | FLOAT7,8 | NUMBER7,8 | FLOAT8 | FLOAT8 | DOUBLE PRECISION |
DOUBLE |
String flgen.columnType = "CHAR", flgen.length = N |
||||||||
CHAR(N) | CHAR(N) | CHAR(N) | CHAR(N) NULL |
CHAR(N) | CHAR(N) | CHAR(N) | CHAR(N) | CHAR(N) |
String flgen.columnType = "VARCHAR", flgen.length = N |
||||||||
VARCHAR(N) | VARCHAR(N) | TEXT(N) | VARCHAR(N) NULL |
VARCHAR2(N) | VARCHAR(N)11 | VARCHAR(N) | VARCHAR(N) | VARCHAR(N) |
String flgen.columnType = "LONG VARCHAR", flgen.length = N |
||||||||
CLOB(N) | BLOB | LONGTEXT | TEXT | LONG | TEXT | TEXT | TEXT | LONGCHAR |
Date | ||||||||
CHAR(16)9 | CHAR(16)9 | CHAR(16)9 | CHAR(16)9 | CHAR(16)9 | CHAR(20)4 | CHAR(16) | CHAR(16) | CHAR(16) |
FLBlob flgen.length = N |
||||||||
BLOB(N) | BLOB | LONGBINARY | IMAGE | LONG ROW | BYTE | - | - | - |
FLClob10 flgen.length = N |
||||||||
CLOB(N) | BLOB | LONGCHAR | TEXT | LONG VARCHAR |
CLOB | - | - | - |
db2 | interbase | msaccess | mssql | oracle | informix |
---|---|---|---|---|---|
String flgen.columnType = "CHAR" |
|||||
254 | 32664 | 255 | 8000 | 4000 | 32767 |
String flgen.columnType = "VARCHAR" |
|||||
4000 | 32664 | 255 | 8000 | 4000 | 255(32767)11 |
Comments:
true
) or 'N' (false
).Long.MIN_VALUE
. Thus:
Long.MIN_VALUE
-> 0, ...,
0 -> -Long.MIN_VALUE
, ...,
Long.MAX_VALUE
-> 264,
and then writes to the database the string representation of the converted number.
This mapping allows sorting.PreparedStatement.setBigDecimal()
method.BigDecimal
and sets then
via PreparedStatement.setBigDecimal()
method.NaN
, NEGATIVE_INFINITY
,
and POSITIVE_INFINITY
values.java.util.Date
to string of 16 symbols:
it pads with zeros the start of Long.toHexString(date.getTime())
string.
This convertion has a bug: sorting is wrong: dates before 1970/01/01 0:00am GMT
(= new Date(0)
) are more than dates after 1970/01/01 0:00am GMT.flgen.length
> 255 are mapped to
two columns: column-value with type corresponding to char
Java type and
column-length with type corresponding to int
.