• 获取存储过程的参数


    --获取表的基本信息Owner
    select
    [TableName]=[Tables].name,[TableOwner]=[Schemas].name
    from sys.tables as [Tables]
    inner join sys.schemas as [Schemas]
    on [Tables].schema_id=[Schemas].schema_id
    where [Tables].name='TableName'

    --根据表名获取字段列表
    select
    [ColumnName]=[Columns].name,
    [SystemTypeName]=[Types].name,
    [Precision]=[Columns].precision,
    [Scale]=[Columns].scale,
    [MaxLength]=[Columns].max_length,
    [IsNullable]=[Columns].is_nullable,
    [IsRowGUIDCol]=[Columns].is_rowguidcol,
    [IsIdentity]=[Columns].is_identity,
    [IsComputed]=[Columns].is_computed,
    [IsXmlDocument]=[Columns].is_xml_document,
    [Description]=[Properties].value
    from sys.tables as [Tables]
    inner join sys.columns as [Columns]
    on [Tables].object_id=[Columns].object_id
    inner join sys.types as [Types]
    on [Columns].system_type_id=[Types].system_type_id and is_user_defined=0 and [Types].name<>'sysname'
    left outer join sys.extended_properties as [Properties]
    on [Properties].major_id=[Tables].object_id and [Properties].minor_id=[Columns].column_id and [Properties].name='MS_Description'
    where [Tables].name='" + sTableName + "' order by [Columns].column_id

    --获取存储过程参数
    select
    [ProceduresName]=[Procedures].name,[Owner]=[Schemas].name
    from sys.procedures as [Procedures]
    inner join sys.schemas as [Schemas]
    on [Procedures].schema_id=[Schemas].schema_id
    where [Procedures].name='" + ProdecureName + "'"

  • 相关阅读:
    linux驱动启动顺序
    ubuntu下安装UltraEdit
    Linux下安装redis
    IntelliJ IDEA 设置Terminal 窗口字体大小
    centOS安装node
    linux下安装pm2
    nuxt部署在Linux下,ip+端口无法访问到
    var与let、const的区别
    JS函数和箭头函数
    回调函数
  • 原文地址:https://www.cnblogs.com/jcgh/p/1969189.html
Copyright © 2020-2023  润新知