DDL Data Type |
Corresponding InterSystems IRIS Data Type Class |
BIGINT |
%Library.BigIntOpens in a new tab
If a BIGINT column can contain both NULLs and extremely small negative numbers, you might need to redefine the index null marker to support standard index collation. For more details, see Indexing a NULL. |
BIGINT(%1) |
%Library.BigIntOpens in a new tab
The %1 parameter is ignored and is provided for MySQL compatibility. This data type is equivalent to BIGINT. |
BINARY |
%Library.BinaryOpens in a new tab(MAXLEN=1) |
BINARY VARYING |
%Library.BinaryOpens in a new tab(MAXLEN=1) |
BINARY VARYING(%1) |
%Library.BinaryOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
BINARY(%1) |
%Library.BinaryOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
BIT |
%Library.BooleanOpens in a new tab
For more details on this data type, see BIT Data Type. |
BLOB |
%Stream.GlobalBinaryOpens in a new tab |
CHAR |
%Library.StringOpens in a new tab(MAXLEN=1) |
CHAR VARYING |
%Library.StringOpens in a new tab(MAXLEN=1) |
CHAR VARYING(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
CHAR(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
CHARACTER |
%Library.BinaryOpens in a new tab(MAXLEN=1) |
CHARACTER VARYING |
%Library.StringOpens in a new tab(MAXLEN=1) |
CHARACTER VARYING(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
CHARACTER(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
CLOB |
%Stream.GlobalCharacterOpens in a new tab |
DATE |
%Library.DateOpens in a new tab |
DATETIME |
%Library.DateTimeOpens in a new tab |
DATETIME2 |
%Library.DateTimeOpens in a new tab |
DEC |
%Library.NumericOpens in a new tab(MAXVAL=999999999999999, MINVAL=-999999999999999, SCALE=0) |
DEC(%1) |
%Library.NumericOpens in a new tab(MAXVAL=<|'$$maxval^%apiSQL(%1,0)'|>,MINVAL=<|'$$minval^%apiSQL(%1,0)'|>,SCALE=0)
This data type uses function parameters to set MINVAL and MAXVAL based on the input precision parameter (%1) with the scale set to 0. For more details on these parameters, see Precision and Scale.
Example: DEC(4) maps to%Library.NumericOpens in a new tab(MAXVAL=9999,MINVAL=–9999,SCALE=0) |
DEC(%1,%2) |
%Library.NumericOpens in a new tab (MAXVAL=<|'$$maxval^%apiSQL(%1,%2)'|>, MINVAL=<|'$$minval^%apiSQL(%1,%2)'|>, SCALE=%2)
This data type uses function parameters to set MINVAL, MAXVAL, and SCALE based on the input precision (%1) and scale (%2) parameters. For more details on these parameters, see Precision and Scale.
Example: DEC(8,4) maps to %Library.NumericOpens in a new tab(MAXVAL=9999.9999,MINVAL=-9999.9999,SCALE=4) |
DECIMAL |
%Library.NumericOpens in a new tab(MAXVAL=999999999999999, MINVAL=-999999999999999, SCALE=0) |
DECIMAL(%1) |
%Library.NumericOpens in a new tab(MAXVAL=<|'$$maxval^%apiSQL(%1,0)'|>,MINVAL=<|'$$minval^%apiSQL(%1,0)'|>,SCALE=0)
This data type uses function parameters to set MINVAL and MAXVAL based on the input precision parameter (%1) with the scale set to 0. For more details on these parameters, see Precision and Scale. This data type is a 64-bit signed integer.
Example: DECIMAL(6) maps to %Library.NumericOpens in a new tab(MAXVAL=999999,MINVAL=-999999,SCALE=0) |
DECIMAL(%1,%2) |
%Library.NumericOpens in a new tab (MAXVAL=<|'$$maxval^%apiSQL(%1,%2)'|>, MINVAL=<|'$$minval^%apiSQL(%1,%2)'|>, SCALE=%2)
This data type uses function parameters to set MINVAL, MAXVAL, and SCALE based on the input precision (%1) and scale (%2) parameters. For more details on these parameters, see Precision and Scale.
Example: DECIMAL(8,4) maps to%Library.NumericOpens in a new tab(MAXVAL=9999.9999,MINVAL=-9999.9999,SCALE=4) |
DOUBLE |
%Library.DoubleOpens in a new tab
This is the IEEE floating point standard. An SQL column with this data type returns a default precision of 20. For further details (including important max/min value limits), see the $DOUBLE function. |
DOUBLE PRECISION |
%Library.DoubleOpens in a new tab
This is the IEEE floating point standard. An SQL column with this data type returns a default precision of 20. For further details (including important max/min value limits), see the $DOUBLE function. |
FLOAT |
%Library.DoubleOpens in a new tab
This is the IEEE floating point standard. An SQL column with this data type returns a default precision of 20. |
FLOAT(%1) |
%Library.DoubleOpens in a new tab
This is the IEEE floating point standard. An SQL column with this data type returns a default precision of 20. |
IMAGE |
%Stream.GlobalBinaryOpens in a new tab |
INT |
%Library.IntegerOpens in a new tab (MAXVAL=2147483647, MINVAL=-2147483648) |
INT(%1) |
%Library.IntegerOpens in a new tab (MAXVAL=2147483647, MINVAL=-2147483648)
The %1 parameter is ignored and is provided for MySQL compatibility. This data type is equivalent to INT. |
INTEGER |
%Library.IntegerOpens in a new tab (MAXVAL=2147483647, MINVAL=-2147483648) |
LONG |
%Stream.GlobalCharacterOpens in a new tab |
LONG BINARY |
%Stream.GlobalBinaryOpens in a new tab |
LONG RAW |
%Stream.GlobalBinaryOpens in a new tab |
LONG VARCHAR |
%Stream.GlobalCharacterOpens in a new tab |
LONG VARCHAR(%1) |
%Stream.GlobalCharacterOpens in a new tab
The %1 parameter is ignored and is provided for MySQL compatibility. |
LONGTEXT |
%Stream.GlobalCharacterOpens in a new tab
The %1 parameter is ignored and is provided for MySQL compatibility. |
LONGVARBINARY |
%Stream.GlobalBinaryOpens in a new tab |
LONGVARBINARY(%1) |
%Stream.GlobalBinaryOpens in a new tab
The %1 parameter is ignored and is provided for MySQL compatibility. |
LONGVARCHAR |
%Stream.GlobalCharacterOpens in a new tab |
LONGVARCHAR(%1) |
%Stream.GlobalCharacterOpens in a new tab |
MEDIUMINT |
%Library.IntegerOpens in a new tab(MAXVAL=8388607,MINVAL=-8388608)
This data type is provided for MySQL compatibility. |
MEDIUMINT(%1) |
%Library.IntegerOpens in a new tab(MAXVAL=8388607,MINVAL=-8388608)
The %1 parameter is ignored and is provided for MySQL compatibility. |
MEDIUMTEXT |
%Stream.GlobalCharacterOpens in a new tab |
MONEY |
%Library.CurrencyOpens in a new tab |
NATIONAL CHAR |
%Library.StringOpens in a new tab(MAXLEN=1) |
NATIONAL CHAR VARYING |
%Library.StringOpens in a new tab(MAXLEN=1) |
NATIONAL CHAR VARYING(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
NATIONAL CHAR(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
NATIONAL CHARACTER |
%Library.StringOpens in a new tab(MAXLEN=1) |
NATIONAL CHARACTER VARYING |
%Library.StringOpens in a new tab(MAXLEN=1) |
NATIONAL CHARACTER VARYING(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
NATIONAL CHARACTER(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
NATIONAL VARCHAR |
%Library.StringOpens in a new tab(MAXLEN=1) |
NATIONAL VARCHAR(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
NCHAR |
%Library.StringOpens in a new tab(MAXLEN=1) |
NCHAR(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
NTEXT |
%Stream.GlobalCharacterOpens in a new tab |
NUMBER |
%Library.NumericOpens in a new tab(SCALE=0)
This data type is a 64-bit signed integer. |
NUMBER(%1) |
%Library.NumericOpens in a new tab(MAXVAL=<|'$$maxval^%apiSQL(%1)'|>,MINVAL=<|'$$minval^%apiSQL(%1)'|>,SCALE=0)
This data type uses function parameters to set MINVAL and MAXVAL based on the input precision parameter (%1) with the scale set to 0. This data type is a 64-bit signed integer.
Example: NUMBER(6) maps to %Library.NumericOpens in a new tab(MAXVAL=999999,MINVAL=-999999,SCALE=0) |
NUMBER(%1,%2) |
%Library.NumericOpens in a new tab (MAXVAL=<|'$$maxval^%apiSQL(%1,%2)'|>, MINVAL=<|'$$minval^%apiSQL(%1,%2)'|>, SCALE=%2)
This data type uses function parameters to set MINVAL, MAXVAL, and SCALE based on the input precision (%1) and scale (%2) parameters.
Example: NUMBER(8,4) maps to%Library.NumericOpens in a new tab(MAXVAL=9999.9999,MINVAL=-9999.9999,SCALE=4) |
NUMERIC |
%Library.NumericOpens in a new tab(MAXVAL=999999999999999, MINVAL=-999999999999999, SCALE=0) |
NUMERIC(%1) |
%Library.NumericOpens in a new tab(MAXVAL=<|'$$maxval^%apiSQL(%1,0)'|>,MINVAL=<|'$$minval^%apiSQL(%1,0)'|>,SCALE=0)
This data type uses function parameters to set MINVAL and MAXVAL based on the input precision parameter (%1) with the scale set to 0. This data type is a 64-bit signed integer.
Example: NUMERIC(6) maps to %Library.NumericOpens in a new tab(MAXVAL=999999,MINVAL=-999999,SCALE=0) |
NUMERIC(%1,%2) |
%Library.NumericOpens in a new tab (MAXVAL=<|'$$maxval^%apiSQL(%1,%2)'|>, MINVAL=<|'$$minval^%apiSQL(%1,%2)'|>, SCALE=%2)
This data type uses function parameters to set MINVAL, MAXVAL, and SCALE based on the input precision (%1) and scale (%2) parameters.
Example: NUMERIC(8,4) maps to%Library.NumericOpens in a new tab(MAXVAL=9999.9999,MINVAL=-9999.9999,SCALE=4) |
NVARCHAR |
%Library.StringOpens in a new tab(MAXLEN=1) |
NVARCHAR(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
NVARCHAR(%1,%2) |
%Library.StringOpens in a new tab(MAXLEN=%1) |
NVARCHAR(MAX) |
%Stream.GlobalCharacterOpens in a new tab
This data type is equivalent to LONGVARCHAR and is provided for TSQL compatibility. |
POSIXTIME |
%Library.PosixTimeOpens in a new tab |
RAW(%1) |
%Library.BinaryOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
REAL |
%Library.DoubleOpens in a new tab
This is the IEEE floating point standard. An SQL column with this data type returns a default precision of 20. |
ROWVERSION |
%Library.RowVersionOpens in a new tab
This data type is a system-assigned sequential integer. See ROWVERSION Data Type for details. |
SERIAL |
%Library.CounterOpens in a new tab
This data type is system-generated |
SMALLDATETIME |
%Library.DateTimeOpens in a new tab(MINVAL="1900-01-01 00:00:00",MAXVAL="2079-06-06 23:59:59") |
SMALLINT |
%Library.SmallIntOpens in a new tab |
SMALLINT(%1) |
%Library.SmallIntOpens in a new tab
The %1 parameter is ignored and is provided for MySQL compatibility. This data type is equivalent to SMALLINT. |
SMALLMONEY |
%Library.CurrencyOpens in a new tab |
SYSNAME |
%Library.StringOpens in a new tab(MAXLEN=128) |
TEXT |
%Stream.GlobalCharacterOpens in a new tab |
TIME |
%Library.TimeOpens in a new tab |
TIME(%1) |
%Library.TimeOpens in a new tab(PRECISION=%1)
PRECISION is the number of fractional second digits, an integer value in the range 0 through 9. |
TIMESTAMP |
%Library.PosixTimeOpens in a new tab |
TIMESTAMP2 |
%Library.TimeStampOpens in a new tab |
TINYINT |
%Library.TinyIntOpens in a new tab |
TINYINT(%1) |
%Library.TinyIntOpens in a new tab
The %1 parameter is ignored and is provided for MySQL compatibility. This data type is equivalent to TINYINT. |
UNIQUEIDENTIFIER |
%Library.UniqueIdentifierOpens in a new tab |
VARBINARY |
%Library.BinaryOpens in a new tab(MAXLEN=1) |
VARBINARY(%1) |
%Library.BinaryOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
VARCHAR |
%Library.StringOpens in a new tab(MAXLEN=1) |
VARCHAR(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
VARCHAR(%1,%2) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |
VARCHAR(MAX) |
%Stream.GlobalCharacterOpens in a new tab
This data type is equivalent to LONGVARCHAR and is provided for TSQL compatibility. |
VARCHAR2(%1) |
%Library.StringOpens in a new tab(MAXLEN=%1)
%1 sets the maximum length of the data type. |