Could not drop object 'student' because it is referenced by a FOREIGN KEY constraint
来源:互联网 发布:手机c语言编辑器 编辑:程序博客网 时间:2024/05/16 06:20
1. Find foreign keys
SELECT* FROM sys.foreign_keysWHERE referenced_object_id = object_id('Student')
2. Delete foreign keys
SELECT 'ALTER TABLE ' + OBJECT_SCHEMA_NAME(parent_object_id)+ '.['+ OBJECT_NAME(parent_object_id)+ '] DROP CONSTRAINT '+ nameFROM sys.foreign_keysWHERE referenced_object_id= object_id('Student')
0 0
- Could not drop object 'student' because it is referenced by a FOREIGN KEY constraint
- Can not delete a master page "This item cannot be deleted because it is still referenced by other pa
- Referenced Assembly could not be resolved because it has a dependency conflict 解决方法
- ERROR 1701 (42000): Cannot truncate a table referenced in a foreign key constraint
- Mysql删除表提示Cannot truncate a table referenced in a foreign key constraint解决办法
- a foreign key constraint fails (`school`.`score1`, CONSTRAINT `FK_jqig2u3ktbhovid14i12faasf` FOREIGN
- 解决Cannot drop index 'PK_school_schooltype': needed in a foreign key constraint
- foreign key constraint is incorrectly formed
- MySQL的數據庫drop不了Cannot delete or update a parent row: a foreign key constraint fails
- PLSQL Trigger will execute even when there is a Foreign Key Constraint Error
- the app xxx.app could not be added to your iTunes library because it is not a valid app
- SQL FOREIGN KEY Constraint
- mysql Error : Cannot truncate a table referenced in a foreign key constraint 清空具有外键约束的表时报
- Cannot add or update a child row: a foreign key constraint fails (`mysql`.`ordermx`, CONSTRAINT `kf
- Cannot add or update a child row: a foreign key constraint fails (`tsproduct/product`, CONSTRAINT `F
- Could not allocate space for object because the PRIMARY filegroup is full
- Could not allocate space for object in database because the filegroup is full
- It is indirectly referenced from required class file ... could not find class......
- 堆内存和栈内存详解
- mac os X下使用root用户
- (转载).Net HttpPost的发送和接收示例代码
- poj 1011
- 什么是特征向量,特征值,矩阵分解---物理意义
- Could not drop object 'student' because it is referenced by a FOREIGN KEY constraint
- C 字符串操作函数集
- Thread Runnable
- 文件打开方式关联错误解决方法
- C++解析JSON的好文章
- margin和padding的区别
- (转载)MVC + JQUERY + AJAX的几种方式
- Erlide 工程目录设置问题
- Native Binder 实例