Solved

Documenting Tables / Columns - MS SQL sp_addextendedproperty equivalent?

Posted on 2006-07-21
5
1,062 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
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.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

947 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now