mysql | postgres | oracle | mssql | db2 | teredata | netezza | |
---|---|---|---|---|---|---|---|
bigint | 8bytes -9223372036854775808~9223372036854775807 0~18446744073709551615 | 8bytes -9223372036854775808~9223372036854775807 | Not support | 8bytes -9223372036854775808~9223372036854775807 | 8bytes (precision of 19digits) -9223372036854775808~9223372036854775807 | 8bytes -9223372036854775808~9223372036854775807 | 8bytes -9223372036854775808~9223372036854775807 |
decimal(m,n) | 65digits 64: MySQL 5.0.3~5.0.5 8?: MySQL 5.0.3 before | no limit? 1000digits? | m:1 ~38 n:-84~127. | m:1 ~38 n:0~m | 1~31digits | m:1~18 | m:1 ~38 n:0~m |
numeric=decimal | numeric=decimal | numeric=decimal | numeric=decimal | numeric=decimal | |||
integer | 4bytes -2147483648~2147483647 0~4294967295 | 4bytes -2147483648~2147483647 | INTEGER=NUMBER(38) | int 4bytes -2147483648~2147483647 | 4bytes (precision of 10digits) -2147483648~2147483647 | 4bytes -2147483648~2147483647 | 4bytes -2147483648~2147483647 |
varchar(n) | 0~255characters : MySQLbefore 0~65,535characters : MySQL 5.0.3 and above | unlimited length | varchar2(n) 4000 bytes | 8000 | 32672bytes | 64000 bytes | 64000 characters |
char(n) | 0~255characters? | unlimited length | 2000 bytes | 8000 | 1~254 | 64000 bytes | 64000 characters |
text | TINYTEXT:255(2^8)bytes TEXT:65535(2^16)bytes MEDIUMTEXT:16777215 (2^24)bytes LONGTEXT:4294967295 (2^32)bytes | unlimited length | CLOB: (4 gigabytes - 1) * (database block size). | 2147483647(2^31-1) | CLOB:2 gigabytes | CLOB? | Not support |
date | date | date | date: oracle date also include time part | datetime: MSSQL only support datetime and smalldatetime | date | date | date |
timestamp | timestamp:4bytes, UTC format, related with time zone datetime: 8 bytes, same format with input, no realtion with timezone | timestamp without time zone | timestamp | datetime: MSSQL only support datetime and smalldatetime | timestamp | timestamp | timestamp |