2011-01-24 3 views

답변

4

오류가 발생하고 삽입물이 손실됩니다.

메시지 8115, 수준 16, 상태 1, 줄 2 IDENTITY를 데이터 형식 int로 변환하는 산술 오버플로 오류. 산술 오버플로가 발생했습니다.

+0

당신이 문서에 대한 링크를 제공하시기 바랍니다 수 있습니다. – Tim

1

쉽게 decimal(1,0)처럼, 아주 작은 ID 열이를 테스트 할 수 :

create table IdentityOverflow (id decimal(1,0) identity) 
while 1=1 
    insert IdentityOverflow default values 

오디드 말한다 마찬가지로,이 인쇄 :

Arithmetic overflow error converting IDENTITY to data type decimal. 

이 정수의 경우에도 가장 큰 위해 보유를 :

create table IdentityOverflow (
    id decimal(38,0) identity(1,10000000000000000000000000000000000000)) 
while 1=1 
    insert IdentityOverflow default values 
5

시험 PLE

create table dbo.MYTABLE (
id tinyint IDENTITY(254,1) 
,name varchar(10) 
) 
GO 
INSERT dbo.MYTABLE (name) VALUES ('row 254') 
GO 
INSERT dbo.MYTABLE (name) VALUES ('row 255') 
GO 
INSERT dbo.MYTABLE (name) VALUES ('broke') 
GO 

Msg 8115, Level 16, State 1, Line 1 
Arithmetic overflow error converting IDENTITY to data type tinyint. 
Arithmetic overflow occurred.