zoukankan      html  css  js  c++  java
  • 查看sqlserver信息

     select * from sys.extended_properties where major_id in (select id from sysobjects  where name = 't_lotteryTogether' ) 

    查看表注释信息

    sp_mshelpcolumns 'dbo.t_websiteNotice'

    查看列信息

    sELECT syscolumns.name,systypes.name,syscolumns.isnullable, syscolumns.length  FROM syscolumns, systypes  WHERE syscolumns.xusertype = systypes.xusertype  AND syscolumns.id = object_id('t_websiteNotice')

    查看字段类型信息

    sp_help  table_name 

    查看表详细信息

    create proc procViewDetail @table_name varchar(100)as
    set @table_name = @table_nameselect sys.columns.name, sys.types.name, sys.columns.max_length, sys.columns.is_nullable,   (select count(*) from sys.identity_columns where sys.identity_columns.object_id = sys.columns.object_id and sys.columns.column_id = sys.identity_columns.column_id) as is_identity ,  (select value from sys.extended_properties where sys.extended_properties.major_id = sys.columns.object_id and sys.extended_properties.minor_id = sys.columns.column_id) as description  from sys.columns, sys.tables, sys.types where sys.columns.object_id = sys.tables.object_id and sys.columns.system_type_id=sys.types.system_type_id and sys.tables.name=@table_name order by sys.columns.column_id

      查看表详细信息

  • 相关阅读:
    Android学习之简单的数据存储
    Android学习Tabhost、gallery、listview、imageswitcher
    Android学习之菜单
    Android学习之Notification
    android自定义控件
    Android简单登录系统
    Android学习自定义Dialog
    Android学习之DialogFragment
    Intent组件
    git
  • 原文地址:https://www.cnblogs.com/chentao5211314/p/1968123.html
Copyright © 2011-2022 走看看