SQL Server: string or binary data would be truncated

2022-08-21 15:54:31 浏览数 (2)

错误描述:SQL Server 插入数据遇到错误 string or binary data would be truncated

代码语言:javascript复制
string or binary data would be truncated 

主要是因为对应列的字段长度不同

转换一下插入的列即可

代码语言:javascript复制
 cast (xxx as nvarchar(500))

0 人点赞