微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

sqlserver 插入或更新表常用 系统错误消息 整理

241 文字型转日期或时刻失败

242 数据库允许日期范围以外

244 超过InT最大值

245 varchar12.9555转int型失败

248 varchar转int超过最大值

547 check约束以外

515 NULL 不允许

2627 主键冲突

2714 对像已经存在(重复)

8114 类型转换错误

8115 型转换引算式溢出

8152 字符超过限定位数

 

 

测试用表

drop table Student
GO

CREATE TABLE Student(
Sno char(9) primary key,
Sname varchar(10) NOt null,
Ssex char(2) check (Ssex in('男','女')),
Sage numeric(2,0) check(([Sage]>1 and [Sage]<100)),
Sdept char(4),
class int,
flg tinyint,
thirty numeric(15,4),
[start_date] datetime
)
GO

insert Student values('313','fan','男','1','6888',2,'126','1000+04-13 25:05:27.000','1000+04-13 25:05:27.000')update Student set Sno='',Sname='',Ssex='男',Sage=99,Sdept='8888'

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐