2

String or binary data would be truncated実行しようとするとエラーが発生します

Insert into Student_info (StudentId,FirstName,LastName,DOB,StudentAddress,StudentEmail,StudentMobile) 
                         (Select StudentId,FirstName,LastName,DOB,Address,EmailId,Mobile from Student_temp where StudentId='" & studentid & "')

のテーブル構造Student_Temp

ここ

のテーブル構造Student_Info

ここ

助けが必要 !!

4

1 に答える 1

3

このエラーは、文字列またはバイナリデータを、それを保持するのに十分な幅がない列に挿入しようとすると、SQLServerによって報告されます。

create table MyTable
(
    Column1 VARCHAR(10)
)

insert into MyTable (Column1) VALUES ('1234567890A')

Msg 8152, Level 16, State 14, Line 1
String or binary data would be truncated

推測では、それはあなたStudent_info.StudentMobilevarchar(10)Student_temp.Mobile is varchar(50)

于 2012-07-20T05:19:37.077 に答える