Type | *Constant | *JavaScript | *Result set | *Parameter | *
---|---|---|---|---|
Exact numerics | *||||
bit |
* [[TYPES.Bit]] |
* boolean |
* ✓ | *✓ | *
tinyint |
* [[TYPES.TinyInt]] |
* number |
* ✓ | *✓ | *
smallint |
* [[TYPES.SmallInt]] |
* number |
* ✓ | *✓ | *
int |
* [[TYPES.Int]] |
* number |
* ✓ | *✓ | *
bigint 1 |
* [[TYPES.BigInt]] |
* string |
* ✓ | *✓ | *
numeric 2 |
* [[TYPES.Numeric]] |
* number |
* ✓ | *✓ | *
decimal 2 |
* [[TYPES.Decimal]] |
* number |
* ✓ | *✓ | *
smallmoney |
* [[TYPES.SmallMoney]] |
* number |
* ✓ | *✓ | *
money |
* [[TYPES.Money]] |
* number |
* ✓ | *✓ | *
Approximate numerics | *||||
float |
* [[TYPES.Float]] |
* number |
* ✓ | *✓ | *
real |
* [[TYPES.Real]] |
* number |
* ✓ | *✓ | *
Date and Time | *||||
smalldatetime |
* [[TYPES.SmallDateTime]] |
* Date |
* ✓ | *✓ | *
datetime |
* [[TYPES.DateTime]] |
* Date |
* ✓ | *✓ | *
datetime2 |
* [[TYPES.DateTime2]] |
* Date |
* ✓ | *✓ | *
datetimeoffset |
* [[TYPES.DateTimeOffset]] |
* Date |
* ✓ | *✓ | *
time |
* [[TYPES.Time]] |
* Date |
* ✓ | *✓ | *
date |
* [[TYPES.Date]] |
* Date |
* ✓ | *✓ | *
Character Strings | *||||
char |
* [[TYPES.Char]] |
* string |
* ✓ | *✓ | *
varchar 3 |
* [[TYPES.VarChar]] |
* string |
* ✓ | *✓ | *
text |
* [[TYPES.Text]] |
* string |
* ✓ | *✓ | *
Unicode Strings | *||||
nchar |
* [[TYPES.NChar]] |
* string |
* ✓ | *✓ | *
nvarchar 3 |
* [[TYPES.NVarChar]] |
* string |
* ✓ | *✓ | *
ntext |
* [[TYPES.NText]] |
* string |
* ✓ | *- | *
Binary Strings4 | *||||
binary |
* [[TYPES.Binary]] |
* Buffer |
* ✓ | *✓ | *
varbinary |
* [[TYPES.VarBinary]] |
* Buffer |
* ✓ | *✓ | *
image |
* [[TYPES.Image]] |
* Buffer |
* ✓ | *✓ | *
Other Data Types | *||||
TVP |
* [[TYPES.TVP]] |
* Object |
* - | *✓ | *
UDT |
* [[TYPES.UDT]] |
* Buffer |
* ✓ | *- | *
uniqueidentifier 4 |
* [[TYPES.UniqueIdentifier]] |
* string |
* ✓ | *✓ | *
variant |
* [[TYPES.Variant]] |
* any |
* ✓ | *- | *
xml |
* [[TYPES.Xml]] |
* string |
* ✓ | *- | *
* Values are returned as a string. This is because values can exceed 53 bits of significant data, which is greater than a
* Javascript number
type can represent as an integer.
*
* For input parameters, default precision is 18 and default scale is 0. Maximum supported precision is 19. *
*
* varchar(max)
and nvarchar(max)
are also supported.
*
* Values are returned as a 16 byte hexadecimal string. *
** Note that the order of bytes is not the same as the character representation. See * Using uniqueidentifier Data * for an example of the different ordering of bytes. *
*