Java and SQL Server supported data types
Applies to: SQL Server 2019 (15.x) and later versions
This article maps SQL Server data types to Java data types for data structures and parameters on sp_execute_external_script.
The following SQL and Java data types are currently supported for input/output data sets and input/output parameters.
SQL Server data type | Java data type | Comment |
---|---|---|
bit | boolean |
|
tinyint | short |
|
smallint | short |
|
int | int |
|
real | float |
|
bigint | long |
|
float | double |
|
nchar(n) | String |
|
nvarchar(n) | String |
|
binary(n) | byte[] |
|
varbinary(n) | byte[] |
|
nvarchar(max) | String |
|
varbinary(max) | byte[] |
|
uniqueidentifier | String |
|
char(n) | String |
Only UTF-8 Strings supported |
varchar(n) | String |
Only UTF-8 Strings supported |
varchar(max) | String |
Only UTF-8 Strings supported |
date | java.sql.date |
|
numeric | java.math.BigDecimal |
|
decimal | java.math.BigDecimal |
|
money | java.math.BigDecimal |
|
smallmoney | java.math.BigDecimal |
|
smalldatetime | java.sql.timestamp |
|
datetime | java.sql.timestamp |
|
datetime2 | java.sql.timestamp |
Related content
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru