다음을 통해 공유


C# .NET 및 SQL Server 지원 데이터 형식

적용 대상: SQL Server 2019(15.x) 이상 버전

이 문서에서는 sp_execute_external_script의 데이터 구조 및 매개 변수에 대해 SQL Server 데이터 형식을 .NET 데이터 형식(C#에서 사용됨)에 매핑합니다.

다음 SQL 및 .NET 데이터 형식은 현재 입력/출력 데이터 집합 및 입력/출력 매개 변수에 대해 지원됩니다.

SQL Server 데이터 형식 .NET 데이터 형식 Comment(설명)
bit bool
tinyint byte
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 Guid
char(n) string
varchar(n) string
varchar(max) string
date DateOnly .NET 6 이상 버전
time TimeOnly .NET 6 이상 버전
numeric decimal
decimal decimal
money decimal
smallmoney decimal
smalldatetime DateTime
datetime DateTime
datetime2 DateTime