SQL types mapping: SAP HANA
Original data types | SAP HANA ® data types |
---|---|
CHAR(n) |
VARCHAR(n) or NVARCHAR(n)
(see note 1) |
VARCHAR(n[,m]) |
VARCHAR(n) or NVARCHAR(n)
(see note 1) |
LVARCHAR(n) |
VARCHAR(n) or NVARCHAR(n) (see
note 1) |
NCHAR(n) |
N/A |
NVARCHAR(n[,m]) |
N/A |
BOOLEAN |
BOOLEAN |
SMALLINT |
SMALLINT |
INT / INTEGER |
INTEGER |
BIGINT |
BIGINT |
INT8 |
BIGINT |
SERIAL[(start)] |
INTEGER (see note 2) |
BIGSERIAL[(start)] |
BIGINT (see note 2) |
SERIAL8[(start)] |
BIGINT (see note 2) |
DOUBLE PRECISION / FLOAT[(n)] |
DOUBLE |
REAL / SMALLFLOAT |
REAL |
NUMERIC / DEC / DECIMAL(p,s) |
DECIMAL(p,s) |
NUMERIC / DEC / DECIMAL(p<=19) |
DECIMAL(p*2,p) |
NUMERIC / DEC / DECIMAL(p>19) |
N/A: Max p is 38 for SAP HANA |
NUMERIC / DEC / DECIMAL |
DECIMAL(32,16) |
MONEY(p,s) |
DECIMAL(p,s) |
MONEY(p) |
DECIMAL(p,2) |
MONEY |
DECIMAL(16,2) |
DATE |
DATE |
DATETIME HOUR TO HOUR |
TIME |
DATETIME HOUR TO MINUTE |
TIME |
DATETIME HOUR TO SECOND |
TIME |
DATETIME HOUR TO FRACTION(n) |
TIMESTAMP (for fraction part) |
DATETIME MINUTE TO MINUTE |
TIME |
DATETIME MINUTE TO SECOND |
TIME |
DATETIME MINUTE TO FRACTION(n) |
TIMESTAMP (for fraction part) |
DATETIME SECOND TO SECOND |
TIME |
DATETIME SECOND TO FRACTION(n) |
TIMESTAMP (for fraction part) |
DATETIME FRACTION TO FRACTION(n) |
TIMESTAMP (for fraction part) |
DATETIME YEAR TO YEAR |
SECONDDATE |
DATETIME YEAR TO MONTH |
SECONDDATE |
DATETIME YEAR TO DAY |
SECONDDATE |
DATETIME YEAR TO HOUR |
SECONDDATE |
DATETIME YEAR TO MINUTE |
SECONDDATE |
DATETIME YEAR TO SECOND |
SECONDDATE |
DATETIME YEAR TO FRACTION(n) |
TIMESTAMP |
DATETIME MONTH TO MONTH |
SECONDDATE |
DATETIME MONTH TO DAY |
SECONDDATE |
DATETIME MONTH TO HOUR |
SECONDDATE |
DATETIME MONTH TO MINUTE |
SECONDDATE |
DATETIME MONTH TO SECOND |
SECONDDATE |
DATETIME MONTH TO FRACTION(n) |
TIMESTAMP |
DATETIME DAY TO DAY |
SECONDDATE |
DATETIME DAY TO HOUR |
SECONDDATE |
DATETIME DAY TO MINUTE |
SECONDDATE |
DATETIME DAY TO SECOND |
SECONDDATE |
DATETIME DAY TO FRACTION(n) |
TIMESTAMP |
INTERVAL q1 TO q2 |
VARCHAR(50) |
TEXT |
CLOB or NCLOB
(see note 3) |
BYTE |
BLOB |
Notes:
- For character data types, see CHAR and VARCHAR data types.
- For serial emulation, see SERIAL and BIGSERIAL data types.
- For LOB data types, see TEXT and BYTE (LOB) types.