Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show Comment of Fields FROM Mysql Table

Tags:

mysql

SHOW COLUMNS FROM <tablename> gives all the information of the columns in a table, except Comments.

How to extract Comments information? I know the way to extract the information from INFORMATION SCHEMA, but how to combine the result in a single result set?

like image 917
Starx Avatar asked Mar 23 '11 10:03

Starx


People also ask

How do I see column comments in MySQL?

Comment assigned to your table will be visible at the bottom of the first tab called Info, along with other table metadata. To view comments for columns go to Columns tab, and comments will be visible in the last column in the grid.

How do I represent a comment in MySQL?

MySQL Server supports three comment styles: From a # character to the end of the line. From a -- sequence to the end of the line. In MySQL, the -- (double-dash) comment style requires the second dash to be followed by at least one whitespace or control character (such as a space, tab, newline, and so on).

How do I see the fields in a table in SQL?

In a query editor, if you highlight the text of table name (ex dbo. MyTable) and hit ALT + F1 , you'll get a list of column names, type, length, etc.


1 Answers

You can use the query

SHOW FULL COLUMNS FROM <tablename> 

If you don't want to use information_schema.

like image 148
Nicola Cossu Avatar answered Sep 26 '22 02:09

Nicola Cossu