zoukankan      html  css  js  c++  java
  • sqlserver 删除所有存储过程的方法

     


    复制代码
    select identity(int,1,1) flag,[name] names into #tmp
    from sysobjects where xtype='p'
    --第二步循环删除
    declare @tb varchar(1000) ,@a int,@b int,@sql varchar(8000)
    select @a=min(flag),@b=max(flag) from #tmp
    while @a<=@b
    begin
    select @tb=names from #tmp where flag=@a
    set @sql='drop Procedure '+@tb
    print @sql
    exec(@sql)
    set @a=@a+1
    end
    drop table #tmp

    复制代码

    号在每次表的架构更改时都增加。
    stats_schema_
    ver int 保留。仅限内部使用。
    type char(2)
    对象类型。可以是下列值之一:
    C = CHECK 约束
    D = 默认值或 DEFAULT 约束F = FOREIGN KEY 约束
    FN =
    标量函数
    IF = 内嵌表函数
    K = PRIMARY KEY 或 UNIQUE 约束
    L = 日志
    P = 存储过程
    R =
    规则
    RF = 复制筛选存储过程
    S = 系统表
    TF = 表函数
    TR = 触发器
    U = 用户表
    V = 视图
    X
    = 扩展存储过程

    userstat smallint 保留。
    sysstat smallint 内部状态信息。
    indexdel
    smallint 保留。
    refdate datetime 留作以后使用。
    version int 留作以后使用。
    deltrig int
    保留。
    instrig int 保留。
    updtrig int 保留。
    seltrig int 保留。
    category int
    用于发布、约束和标识。
    cache smallint 保留。

  • 相关阅读:
    Spring Boot|Async
    SonarQube使用
    大数据|linux权限chmod和chown
    Spring Boot|监控-Actuator
    Docker|部署及简单使用
    Spring|IOC启动流程
    Spring|注解
    Spring|@Autowired与new的区别
    Spring|Spring MVC
    个人站点
  • 原文地址:https://www.cnblogs.com/robinli/p/2641053.html
Copyright © 2011-2022 走看看