Truncate table Menu --truncate不能对有外键的表 delete Menu delete RoleMenu SELECT * FROM sys.foreign_keys WHERE referenced_object_id=OBJECT_ID('Menu'); --找到引用该表主键的名称 ALTER TABLE dbo.RoleMenu DROP constraint FK_Menu_MenuId --删除外键