请问primary key for table xs ' is not unique 原因

nikewjh 2011-09-03 11:21:52
sqlstate:23000
[sybase][odbc driver][ adaptive server anywhere] integrity constraint violation:primary key for table xs ' is not unique
这是我写入的SQL语句

insert into xs
values('081101','王林','计算机',1,'1990-02-10',50,null);
execute 时出现的语句,xs是我定义的表,主键设为学生 ,我不知道问题出在哪里,我刚学,自己搞了很久都不会,希望有朋友可以指点一下。
...全文
583 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wag_enu 2011-09-03
  • 打赏
  • 举报
回复
看看是不是已经存在 王林 的学生了。
nikewjh 2011-09-03
  • 打赏
  • 举报
回复
谢谢你们,我以为执行就会显示表格,就重复点了执行,然后就出错了,谢谢各位。
yyoinge 2011-09-03
  • 打赏
  • 举报
回复
Probable cause
You attempted to add a new row to a table, but the new row has the same primary key as an existing row. The database has not added the incorrect row to the database. For example, you might have added a student with student number 86004 and there is already a row for a student with that number.
ribut9225 2011-09-03
  • 打赏
  • 举报
回复
楼上二位都对
违反主键规则,数据冲突了
Nate 2011-09-03
  • 打赏
  • 举报
回复
违反主键唯一性,1#正解

1,108

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧