惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
T
Troy Hunt's Blog
B
Blog
N
Netflix TechBlog - Medium
H
Help Net Security
PCI Perspectives
PCI Perspectives
罗磊的独立博客
SecWiki News
SecWiki News
S
Security Affairs
Webroot Blog
Webroot Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
V
Visual Studio Blog
V2EX - 技术
V2EX - 技术
Recorded Future
Recorded Future
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
博客园 - 【当耐特】
Attack and Defense Labs
Attack and Defense Labs
S
Secure Thoughts
Hugging Face - Blog
Hugging Face - Blog
Forbes - Security
Forbes - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
M
MIT News - Artificial intelligence
博客园_首页
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog
T
Tailwind CSS Blog
The Cloudflare Blog
P
Proofpoint News Feed
D
DataBreaches.Net
N
News and Events Feed by Topic
G
Google Developers Blog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MyScale Blog
MyScale Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
AI
AI
O
OpenAI News
雷峰网
雷峰网
C
Check Point Blog
大猫的无限游戏
大猫的无限游戏
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Blog — PlanetScale
Blog — PlanetScale
有赞技术团队
有赞技术团队

博客园 - C#初学者009

脱壳学习 如何将字符串动态转换为指定的值类型 - C#初学者009 - 博客园 关于Wind2003下MSDTC对DTS运行的影响 SQL 标识列起始种子重设 C#跨线程操作控件 通过委托处理,MSDN上又很详细用法的说明 - C#初学者009 - 博客园 .net项目开发工具(V3.0 ) asp.net控件开发基础(5) -- 复杂属性、内嵌属性 - C#初学者009 如何用vb设置默认打印机? 如何使用 SetPrinter 修改打印机设置 用vb做的activex控件打包成cab后如何发布呢? VB中利用CopyMemory使用指针 如何用vb(API)代码设置不规则打印纸尺寸? 如何在 Windows NT 和 Windows 2000 中使用自定义页面大小打印(VB) 确定打印机状态和打印工作状态从Visual Basic VB怎么检测打印机状态 - C#初学者009 - 博客园 在.NET中实现对象序列化(转) XmlSerializer 常见问题疑难解答(MSDN) TransactionScope和分布式事务 (转) 对象序列化:使用System.Xml.Serialization命名空间(转)
SQL Server表描述 及 字段描述的增、删、改、查询
C#初学者009 · 2009-09-24 · via 博客园 - C#初学者009
可以自己查询系统表:
SELECT o.name AS tableName, c.name AS columnName, p.[value] AS Description
FROM sysproperties p INNER JOIN
      sysobjects o ON o.id = p.id INNER JOIN
      syscolumns c ON p.id = c.id AND p.smallid = c.colid
WHERE (p.name = 'MS_Description')
ORDER BY o.name

--创建表及描述信息

create   table   表(a1   varchar(10),a2   char(2))

--为表添加描述信息
EXECUTE   sp_addextendedproperty   N'MS_Description',   '人员信息表',   N'user',   N'dbo',   N'table',   N'表',   NULL,   NULL

--为字段a1添加描述信息
EXECUTE   sp_addextendedproperty   N'MS_Description',   '姓名',   N'user',   N'dbo',   N'table',   N'表',   N'column',   N'a1'

--为字段a2添加描述信息
EXECUTE   sp_addextendedproperty   N'MS_Description',   '性别',   N'user',   N'dbo',   N'table',   N'表',   N'column',   N'a2'
--更新表中列a1的描述属性:
EXEC   sp_updateextendedproperty   'MS_Description','字段1','user',dbo,'table','表','column',a1

--删除表中列a1的描述属性:
EXEC   sp_dropextendedproperty   'MS_Description','user',dbo,'table','表','column',a1

--删除测试
drop   table   表 

至于查询出来,sql server有提供系统函数fn_listextendedproperty ():

--获取某一个字段的描述
SELECT   *
FROM   ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table', '表名', 'column', default)--其他变数,按照你的要求你照写即可,只要表名换成你的
where objname = '字段名'