COMMENT Statement
This page shows you how to use the COMMENT
statement. The COMMENT
statement appears very implementation dependent. Oracle supports it with complete references in the data catalog. SQL Server supports it as an advanced property of tables, and provides custom functions to read and write comments against tables and columns.
The COMMENT
statement lets you add a comment to a table or a column in a table. It is very handy for labeling foreign key columns that aren’t constrained by a database constraint because developers can then check the valid list of values. It is also very handy for letting you qualify the list of acceptable values imposed by a CHECK
constraint in Oracle. MySQL treats check constraints through the ENUM
and SET
data types.
Your first example for COMMENT is confusing because it says, “‘A table of small tables, and it mimics the ENUM or SET data type in Oracle’;” And I believe it should say it mimics the ENUM or SET data type in MySQL. Maybe I am misunderstanding something….
Derek Griggs
6 Oct 11 at 5:52 pm
Derek, Good catch. It’s fixed.
michaelmclaughlin
22 Oct 14 at 3:12 am