Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comment Field in MS SQL Server - Like Comment field in MS Access

Status
Not open for further replies.

JordanR

Technical User
Oct 3, 2002
182
US
Is it possible to set a table field in MS SQL Server to be like a comment field in MS Access.
If so, how do I set it up and are there any security risks?

Thanks
 
AFAIK can be done with extended properties but isn't much practical:
Code:
execute sp_addextendedproperty 'Comment', 'Blah blah', 'user', 'dbo', 'table', 'myFirstTable', null, null
execute sp_addextendedproperty 'Comment', 'Blah blah 2', 'user', 'dbo', 'table', 'mySecondTable', null, null

select A.name, B.value as comment from sysobjects A
left join ::fn_listextendedproperty ('Comment', 'user', 'dbo', 'table', null, null, null ) B on A.name=B.objname
where A.xtype = 'U' order by A.name
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top