--取得表主键
exec sp_pkeys 'Users','dbo','ArticleRelease'
--取得表字段
select * from syscolumns where id = object_id('Users')
--取得字段说明
SELECT * FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table', 'Users', 'column', default) where name='MS_Description'
--添加字段说明
exec sp_addextendedproperty N'MS_Description',N'描述內容',N'user',N'dbo',N'table',N'表名',N'column',N'列名'  
--修改字段说明
exec sp_updateextendedproperty N'MS_Description',N'描述內容',N'user',N'dbo',N'table',N'表名',N'column',N'列名'  
--删除字段说明
exec sp_dropextendedproperty N'MS_Description',N'user',N'dbo',N'table',N'表名',N'column',N'列名'
--获得数据库列表(master库中)
select * from sysdatabases
--获得表列表
select * from sysobjects where xtype='U' and name<>'dtproperties'

相关文章:

  • 2021-08-17
  • 2021-05-26
  • 2021-11-09
  • 2021-08-20
  • 2022-02-18
  • 2022-02-27
  • 2021-07-22
  • 2022-02-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2021-08-12
  • 2021-12-16
  • 2022-12-23
相关资源
相似解决方案