设为首页 加入收藏

TOP

读出sql表结构
2011-05-31 18:01:50 来源: 作者: 【 】 浏览:508次 评论:0
select object_name(c.id) as 表名
 ,c.name as 字段名
 ,t.name 数据类型
     ,c.length 长度
 ,c.prec as 精度
 ,p.value as 字段说明
 ,m.text as 默认值
     ,case when c.status=0x80 then 1 else 0 end 标识
     ,c.iscomputed 是否已计算该列的标志
     ,c.isnullable 是否允许空值
     ,c.isoutparam 是否输出参数 
from      syscolumns c
     inner join systypes t on c.xusertype=t.xusertype
 left join sysproperties p on c.id=p.id and c.colid = p.smallid
 left join syscomments m on c.cdefault=m.id
where     objectproperty(c.id,'IsUserTable')=1 and object_name(c.id)='dat_deptinfo'
您看到此篇文章时的感受是:
Tags: 责任编辑:administrator
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到QQ空间
分享到: 
上一篇巧用缓存提高ASP应用程序的性能 下一篇通用分页的存储过程函数

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

相关栏目

最新文章

图片主题

热门文章

推荐文章

相关文章

广告位