Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we add comments or a README file to a SQL Server database/table?

These days I am importing quite a lot of databases from my server and working on them locally. In the process, I am making a number of changes to the table structure and in the process using some complex SQL statements to add the table columns.

Keeping track of everything in a separate file is beginning to be a pain and am wondering if there is a way to do this directly in the SSMS so that I can store the instructions along with the database. Is there any way this can be done or do I have to resort to writing documentation outside SQL Server?

Of course, I can always create a stub table called comments and put everything there but I was looking for a way to associate comments with a particular database or tables. Any suggestions would be greatly appreciated.

like image 991
Legend Avatar asked Jul 21 '11 04:07

Legend


1 Answers

SQL-Server handles commenting on database objects through Extended Properties:

http://msdn.microsoft.com/en-us/library/ms190243.aspx

like image 172
Edgar Velasquez Lim Avatar answered Sep 28 '22 18:09

Edgar Velasquez Lim