[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1073
  • 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

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

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