某表的某个字段作为另一个表的FOREIGN KEY,在truncate另外一个表后,再truncate某表,就报如上的错. 解决方法: → 删除另外一个表的外键 IF OBJECT_ID(N'[dbo].[外键]', 'F') IS NOT NULL ALTER TABLE [dbo].[另外一个表] DROP CONSTRAINT [外键]; GO → truncate某表 truncate table 某表 → 再为另外一个表创建外键约束 ALTER TABLE [dbo].[另外一个表]…
Python报错总结: 常见异常 1,NameError: name 'a' is not defined:未定义函数名 2,IndentationError: unindent does not match any outer indentation level :代码缩进问题 3,IndentationError: unexpected indent:代码缩进问题 4,TypeError: %d format: a number is required, not st…