zoukankan      html  css  js  c++  java
  • 清空数据库

    /*
    功能:删除当前数据库有用户表数据
    设计:OK_008
    时间:2006-05
    备注:该脚本执行危险性为★★★★★,不要随意执行
    */

     1:  DECLARE @tablename varchar(50)
     2:  DECLARE @truncatesql varchar(255)
     3:  DECLARE TrCun_Cursor CURSOR FOR
     4:  select [name] from sysobjects where type = 'U'
     5:  OPEN TrCun_Cursor
     6:  FETCH TrCun_Cursor INTO @tablename
     7:  WHILE(@@fetch_status = 0)
     8:  BEGIN
     9:          SET @truncatesql = 'truncate table ' + @tablename
    10:          -exec(@truncatesql) --当?要?删?除?时?,?就?去?掉?--
    11:          PRINT @truncatesql
    12:          FETCH TrCun_Cursor INTO @tablename
    13:  END
    14:  CLOSE TrCun_Cursor
    15:  DEALLOCATE TrCun_Cursor 
    16:  
  • 相关阅读:
    用GDB调试程序(一)
    vim添加删除多行注释
    python binary lib on win/各种python库的二进制包
    python使用libssh2连接linux
    python xpath
    splinter python浏览器自动化操作,模拟浏览器的行为
    pytesser图片文本识别
    python验证码识别
    Python 之 使用 PIL 库做图像处理
    Connection reset by peer问题分析
  • 原文地址:https://www.cnblogs.com/mmmhhhlll/p/1697115.html
Copyright © 2011-2022 走看看