首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

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

2012-02-24 
请问primarykeyfortablexs isnotunique 原因sqlstate:23000[sybase][odbcdriver][ adaptive server anywh

请问primary key for table xs ' is not unique 原因
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是我定义的表,主键设为学生 ,我不知道问题出在哪里,我刚学,自己搞了很久都不会,希望有朋友可以指点一下。

[解决办法]
看看是不是已经存在 王林 的学生了。

[解决办法]
违反主键唯一性,1#正解
[解决办法]
楼上二位都对
违反主键规则,数据冲突了
[解决办法]
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.

热点排行