Implicitly convertible data types
- Last UpdatedFeb 12, 2024
- 1 minute read
The following table lists the implicitly convertible data types:
|
Field type |
SQL type (From) |
To |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Bit |
Small |
Int |
Big |
Decimal (18,4) |
Unique |
Float |
nVar |
Date |
Tiny |
SQL_ |
||
|
Boolean |
Bit |
Y |
Y |
Y |
N |
Y |
Y |
N |
Y |
Y |
||
|
Int16 |
Small |
Y |
Y |
Y |
Y |
N |
Y |
Y |
N |
Y |
Y |
|
|
Int32 |
Int |
Y |
Y |
Y |
Y |
N |
Y |
Y |
N |
Y |
Y |
|
|
Int64 |
BigInt |
Y |
Y |
Y |
Y |
N |
Y |
Y |
N |
Y |
Y |
|
|
Decimal |
Decimal (26,9) |
Y |
Y |
Y |
Y |
N |
Y |
Y |
N |
Y |
Y |
|
|
Guid |
Unique |
N |
N |
N |
N |
N |
N |
Y |
N |
N |
Y |
|
|
Double |
Float |
Y |
Y |
Y |
Y |
Y |
N |
Y |
N |
Y |
Y |
|
|
String |
nVar |
Y |
Y |
Y |
Y |
Y |
Y |
Y |
Y |
Y |
Y |
|
|
Date |
Date |
N |
N |
N |
N |
N |
N |
N |
Y |
N |
Y |
|
|
Byte |
TinyInt |
Y |
Y |
Y |
Y |
Y |
N |
Y |
Y |
N |
Y |
|
|
Other |
SQL_ |
N |
N |
N |
N |
N |
N |
N |
N |
N |
N |
|
Y indicates that the field type can be implicitly converted. When data is not convertible, NULL value is inserted. For example, a Float value of 23.5678 cannot be converted to an Int, but a Float value of 567.0 can be converted to an Int.
N indicates that the field type cannot be implicitly converted.