[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

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