• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1074
  • Last Modified:

Documenting Tables / Columns - MS SQL sp_addextendedproperty equivalent?

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
renesisx
Asked:
renesisx
  • 4
1 Solution
 
Raynard7Commented:
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
 
Raynard7Commented:
ALTER TABLE `mytable` COMMENT = 'my comment - this is a cool table';
0
 
Raynard7Commented:
alter table myTable ,change `myColumn` COMMENT 'ABCDEFG'
0
 
renesisxAuthor Commented:
Don't you ever sleep? ;)
0
 
Raynard7Commented:
;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now