The comment syntax just described applies to how the mysqld server parses SQL statements. The mysql client program also performs some parsing of statements before sending them to the server. It does this to determine statement boundaries within a multiple-statement input line. A comment for a column can be specified with the COMMENT option. The comment is displayed by the SHOW CREATE TABLE and SHOW FULL COLUMNS statements.
It is allowed but ignored in earlier versions. The fact that my table comment post remains quite popular indicates that mySQL hasn’t SEO’d their pages on it thoroughly enough, and people are obviously looking for information on it. So… I thought I should follow with a column comment post.
As a matter of fact in mySQL you can also comment at the column level, and probably should. It also allows you to add the new column after an existing column using the AFTER existing_column clause. If you have gotten to my post, you probably realize that there is no easy way to add comments (unless you have a nice application that does it for you). GitHub Gist: instantly share code, notes, and snippets. Changing mysql table comment.
MySQL: ALTER TABLE Statement. Ask Question Asked years, months ago. Active years, months ago.
Sometimes wee need to add a comment to a column for understanding purpose means to easily identify what is the use of that particular column. We can add comment to a column by two ways- at the time of table creation or by ALTER command after creating the table with the help of COMMENT attribute. If use this is useful for understanding database schema and meaning of data elements.
Add a comment to one of the fields.
Keine Kommentare:
Kommentar veröffentlichen
Hinweis: Nur ein Mitglied dieses Blogs kann Kommentare posten.