惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
人人都是产品经理
人人都是产品经理
aimingoo的专栏
aimingoo的专栏
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
V
Visual Studio Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
MyScale Blog
MyScale Blog
Hugging Face - Blog
Hugging Face - Blog
宝玉的分享
宝玉的分享
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 叶小钗
博客园 - 聂微东
U
Unit 42
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
IT之家
IT之家
The GitHub Blog
The GitHub Blog
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
Y
Y Combinator Blog
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)

博客园 - 凬月

DIV+CSS中标签dl dt dd常用的用法 使用gulp构建一个项目 (转)利用CAS算法实现通用线程安全状态机 棋牌游戏服务器架构设计 STM32F103引脚功能定义 STM32的型号的命名规则 关闭jtag保留swd 微信支付----维权接口开发!(转掌眼) 微信支付--入门篇(转掌眼) LoadRunner培训初级教程 [转]在windows环境中使用varnish squid-nginx 基本配置 redis windows下的环境搭建 显示数据库中所有表的记录数 一个带标号的CSS文章列表写法 CSS图片列表 YUI3 CSS Ubuntu 13.10 64位 无法 安装 ia32-libs 解决办法 [转]编译Android源代码常见错误解决办法
删除MSSQL数据库中所有表
凬月 · 2015-01-17 · via 博客园 - 凬月
--删除所有约束  
DECLARE c1 cursor for  
    select 'alter table ['+ object_name(parent_obj) + '] drop constraint ['+name+']; '  
    from sysobjects  
    where xtype = 'F'  
open c1  
declare @c1 varchar(8000)  
fetch next from c1 into @c1  
while(@@fetch_status=0)  
    begin  
        exec(@c1)  
        fetch next from c1 into @c1  
    end  
close c1  
deallocate c1  
--删除数据库所有表  
declare @tname varchar(8000)  
set @tname=''  
select @tname=@tname + Name + ',' from sysobjects where xtype='U'  
select @tname='drop table ' + left(@tname,len(@tname)-1)  
exec(@tname)  

posted @ 2015-01-17 16:30  凬月  阅读(427)  评论()    收藏  举报