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.