Solved

Documenting Tables / Columns - MS SQL sp_addextendedproperty equivalent?

Posted on 2006-07-21
5
1,064 Views
Last Modified: 2012-05-05
In MS SQL I can document the DB "inline" as it were.. so if I want to add a "comment" to a database, I can:

EXEC sp_addextendedproperty
@name = N'Caption', @value = 'This is a lovely database about cheeses';

And on a column:

EXEC sp_addextendedproperty
@name = N'Caption', @value = 'Potency of cheese',
@level0type = N'Schema', @level0name = Cheese,
@level1type = N'Table',  @level1name = CheeseDetails,
@level2type = N'Column', @level2name = Strength;

I then use these columns to generate comments and "Intellisense" against the objects in my code.

Is there any similar equivalent in MySQL?

0
Comment
Question by:renesisx
  • 4
5 Comments
 
LVL 35

Expert Comment

by:Raynard7
ID: 17152617
You need to alter the table or column,

http://dev.mysql.com/doc/refman/5.0/en/alter-table.html

Gives the alter table syntax,

0
 
LVL 35

Expert Comment

by:Raynard7
ID: 17152620
ALTER TABLE `mytable` COMMENT = 'my comment - this is a cool table';
0
 
LVL 35

Accepted Solution

by:
Raynard7 earned 500 total points
ID: 17152622
alter table myTable ,change `myColumn` COMMENT 'ABCDEFG'
0
 
LVL 1

Author Comment

by:renesisx
ID: 17152640
Don't you ever sleep? ;)
0
 
LVL 35

Expert Comment

by:Raynard7
ID: 17152772
;-)
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question