在 jupyter notebook 中使用 sqlite3 中的相同主键时,我没有收到完整性错误

问题描述

enter image description here

我刚开始学习 RDBMS,并尝试在 jupyter notebook 中实现它。

cur.execute("create table empinfo(id INT PRIMARY KEY,salary REAL,loc TEXT,deptno INT)")
cur.execute("insert into empinfo values(1001,6677.88,'blr',2001)")
cur.execute("insert into empinfo values(1001,2001)")

我没有收到使用相同主键的完整性错误。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)