[MSSQL] Can't truncate table
2015/10/20 10:09:58 类别:数据库摘要:[MSSQL] Cannot truncate table,because it is being referenced by a FOREIGN KEY constraint?
程序调试完毕,准备清空数据 运行
Truncate Table tmpcontent
MSSQL报错'Can not truncate table tmpcontent because it is being referenced by a foreign key constraint.
是由于外键FK限制了,于是找到度娘 方法有几 不过这里只提供最简单方便的一种 复制如下命令 替换相应参数 GO...
Delete [資料表名稱]; DBCC CHECKIDENT('資料表名稱', RESEED, 0);