zoukankan      html  css  js  c++  java
  • 获取存储过程的参数

    --获取表的基本信息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 + "'"

  • 相关阅读:
    HDU 1097
    HDU 1045
    HDU 1039 -Easier Done Than Said?
    HDU 1038
    HDU 1037 - Keep on Truckin'
    HDU 1036 - Average is not Fast Enough!
    hdu 1701 ACMer
    hdu 1711 Number Sequence(kmp)
    hdu 2087 剪花布条
    字符串匹配-KMP算法学习笔记
  • 原文地址:https://www.cnblogs.com/jcgh/p/1969189.html
Copyright © 2011-2022 走看看