SQL types mapping: IBM Netezza
Original data types | IBM Netezza data types |
---|---|
CHAR(n) |
CHAR(n) or NCHAR(n) (see note 1) |
VARCHAR(n[,m]) |
VARCHAR(n) or NVARCHAR(n) (see
note 1) |
NCHAR(n) |
NCHAR(n) (see note 1) |
NVARCHAR(n[,m]) |
NVARCHAR(n) (see note 1) |
BOOLEAN |
BOOLEAN |
SMALLINT |
SMALLINT |
INTEGER |
INTEGER |
BIGINT |
BIGINT |
INT8 |
BIGINT |
SERIAL[(start)] |
N/A (see note 2) |
BIGSERIAL[(start)] |
N/A (see note 2) |
SERIAL8[(start)] |
N/A (see note 2) |
DOUBLE PRECISION / FLOAT[(n)] |
DOUBLE |
REAL / SMALLFLOAT |
REAL |
DECIMAL(p,s) |
DECIMAL(p,s) |
DECIMAL(p) |
DECIMAL(p*2,p) |
DECIMAL |
DECIMAL(32,16) |
MONEY(p,s) |
DECIMAL(p,s) |
MONEY(p) |
DECIMAL(p,2) |
MONEY |
DECIMAL(16,2) |
TEXT |
N/A (see note 3) |
BYTE |
N/A (see note 3) |
DATE |
DATE |
DATETIME HOUR TO MINUTE |
TIME |
DATETIME HOUR TO SECOND |
TIME |
DATETIME HOUR TO FRACTION(n) |
TIME |
DATETIME YEAR TO MONTH |
TIMESTAMP |
DATETIME YEAR TO DAY |
TIMESTAMP |
DATETIME YEAR TO HOUR |
TIMESTAMP |
DATETIME YEAR TO MINUTE |
TIMESTAMP |
DATETIME YEAR TO SECOND |
TIMESTAMP |
DATETIME YEAR TO FRACTION(n) |
TIMESTAMP |
INTERVAL YEAR[(p)] TO MONTH |
CHAR(50) |
INTERVAL YEAR[(p)] TO YEAR |
CHAR(50) |
INTERVAL MONTH[(p)] TO MONTH |
INTERVAL |
INTERVAL DAY[(p)] TO FRACTION(n) |
INTERVAL |
INTERVAL DAY[(p)] TO SECOND |
INTERVAL |
INTERVAL DAY[(p)] TO MINUTE |
INTERVAL |
INTERVAL DAY[(p)] TO HOUR |
INTERVAL |
INTERVAL DAY[(p)] TO DAY |
INTERVAL |
INTERVAL HOUR[(p)] TO FRACTION(n) |
INTERVAL |
INTERVAL HOUR[(p)] TO SECOND |
INTERVAL |
INTERVAL HOUR[(p)] TO MINUTE |
INTERVAL |
INTERVAL HOUR[(p)] TO HOUR |
INTERVAL |
INTERVAL MINUTE[(p)] TO FRACTION(n) |
INTERVAL |
INTERVAL MINUTE[(p)] TO SECOND |
INTERVAL |
INTERVAL MINUTE[(p)] TO MINUTE |
INTERVAL |
INTERVAL SECOND[(p)] TO FRACTION(n) |
INTERVAL |
INTERVAL SECOND[(p)] TO SECOND |
INTERVAL |
INTERVAL FRACTION[(p)] TO FRACTION(n) |
INTERVAL |
Notes:
- For character data types, CHAR and VARCHAR data types
- For serial emulation, see SERIAL and BIGSERIAL data types.
- For LOB data types, see TEXT and BYTE (LOB) types.