对数据库对象的描述,存放在哪里?

kfcn 2003-06-03 01:54:47
我说的是指对一个字段的说明、描述的内容存放的数据库(系统表的)的那里?
描述在设计表的时候输入的,,请问一下还有没有可以直接从其它表中查出来!!
希望知道的朋友能够帮助我,、
我在线等待!!
...全文
144 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
kfcn 2003-06-04
  • 打赏
  • 举报
回复
谢谢大力!!
you is my idol
pengdali 2003-06-03
  • 打赏
  • 举报
回复
select rtrim(b.name) as colname
,case when h.id is not null then 'PK' else '' end as primarykey
,type_name(b.xusertype) + case when b.colstat & 1 = 1 then '[ID(' + convert(varchar,ident_seed(a.name)) + ',' + convert(varchar,ident_incr(a.name)) + ')]' else '' end as type
,b.length
,case b.isnullable when 0 then 'N' else 'Y' end as [isnull]
,isnull(e.text,'') as [default]
,isnull(c.value,'') as descript
from sysobjects a,syscolumns b
left outer join sysproperties c on b.id = c.id and b.colid = c.smallid
left outer join syscomments e on b.cdefault = e.id
left outer join (select g.id,g.colid from sysindexes f,sysindexkeys g where f.id = g.id and f.indid = g.indid and f.indid > 0 and f.indid < 255 and (f.status & 2048)<>0) h on b.id = h.id and b.colid = h.colid
where a.id = b.id
and a.id = object_id('titles') --tablename改成你要导出的表的名称
order by b.colid

--给个全的!
kfcn 2003-06-03
  • 打赏
  • 举报
回复
看错了
有五十分
马上给你,
kfcn 2003-06-03
  • 打赏
  • 举报
回复
我只有五分全给你了,
对不起哦
谢谢哈哈
psxfghost 2003-06-03
  • 打赏
  • 举报
回复
SELECT *
FROM ::fn_listextendedproperty ('MS_Description', 'user', 'dbo', 'table', '表名', 'column', default)
psxfghost 2003-06-03
  • 打赏
  • 举报
回复
SELECT *
FROM ::fn_listextendedproperty ('MS_Description', 'user', 'dbo', 'table', 'b', 'column', default)
kfcn 2003-06-03
  • 打赏
  • 举报
回复
描述一般都是文字的,
这样返回了许多,,
而且也没有描述的内容,
请高手再指点!!
a1n1 2003-06-03
  • 打赏
  • 举报
回复

(所影响的行数为 0 行)
wgy2008 2003-06-03
  • 打赏
  • 举报
回复
select *
from syscolumns
where name = '字段'

27,579

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 应用实例
社区管理员
  • 应用实例社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧