Declare @phoneNumber int
select @phoneNumber=Isnull('08041159620',0);
エラーを出す:
The conversion of the varchar value '8041159620' overflowed an int column.: select cast('8041159620' as int)
AS
整数は次のように定義されます:
-2 ^ 31(-2,147,483,648)から2 ^ 31-1(2,147,483,647)までの整数(整数)データ。ストレージサイズは4バイトです。 intのSQL-92シノニムは整数です。
解決策
Declare @phoneNumber bigint