SQLServer 删除所有表的外键约束
2024-09-02 04:22:32
DECLARE c1 cursor for
select 'alter table ['+ object_name(parent_obj) + '] drop constraint ['+name+']; '
from sysobjects
where xtype = 'F'
open c1declare @c1 varchar(8000)
fetch next from c1 into @c1while(@@fetch_status=0)
begin
exec(@c1)
fetch next from c1 into @c1
endclose
c1deallocate c1
最新文章
- codevs 1536 海战
- 【Codeforces717F】Heroes of Making Magic III 线段树 + 找规律
- 使用jQuery实现点击左右滑动切换特效
- 报错解决:No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
- Struts2的一个问题: 找不到struts.xml的路径问题
- jQuery日期联动插件
- IOS数据库操作SQLite3使用详解(转)
- JavaScript基础5——关于ECMAscript的函数
- home目录迁移至新分区
- 基础select语句详解
- SpringBoot+MyBatis+MySQL读写分离
- CRM之分页
- hadoop第一个例子
- [APIO2013]机器人(斯坦纳树)
- Building Microservices with Spring Boot and Apache Thrift. Part 2. Swifty services
- Solr7.1--- 指定ConfigSets
- 《Linux内核分析》-- 扒开系统调用的三层皮(下)之system_call中断处理过程 20135311傅冬菁
- Lucene4:获取中文分词结果,根据文本计算boost
- CentOS7系统安装 Maria Db(MYSQL)教程
- 在Mac中如何正确地设置JAVA_HOME
热门文章
- Web消息主体风格(Message Body Style)
- 如何使用Iveely的数据存储引擎 Iveely Database
- 从零开始写redis客户端(deerlet-redis-client)之路——第一个纠结很久的问题,restore引发的血案
- ModernUI教程:使用预定义的页面布局
- (旧)子数涵数·Flash——路径补间
- js中的DOM操作(2)
- 网站开发技巧, 使用byte[]持久化用户个性设置
- 每天一个linux命令(39):iostat命令
- Daily Scrum – 1/6
- jquery tree events didn't work