?
Solved

Documenting Tables / Columns - MS SQL sp_addextendedproperty equivalent?

Posted on 2006-07-21
5
Medium Priority
?
1,069 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

765 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