I would like to see individual fields comments. Typically something I would expect from "describe" parameters.
mysql> describe metrics; +-------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+---------------------+------+-----+---------+----------------+ | id | int(10) unsigned | NO | PRI | NULL | auto_increment | | ty | int(10) unsigned | NO | | NULL | | | t | bigint(20) unsigned | NO | | NULL | | | s | int(10) unsigned | NO | | 60000 | | | e | int(10) unsigned | NO | | NULL | | | c | int(10) unsigned | NO | | NULL | | +-------+---------------------+------+-----+---------+----------------+
Syntax Using # symbol In MySQL, a comment started with # symbol must be at the end of a line in your SQL statement with a line break after it. This method of commenting can only span a single line within your SQL and must be at the end of the line.
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).
This is a type of comment. The /* is the beginning of a comment and */ is the end of comment. MySQL will ignore the above comment.
The first command you will need to use is the SELECT FROM MySQL statement that has the following syntax: SELECT * FROM table_name; This is a basic MySQL query which will tell the script to select all the records from the table_name table.
show full columns from <table_name>
This is the output:
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment
I hope this is useful for you
This query will give you much more information than the describe
statement:
SELECT * FROM information_schema.columns WHERE table_name = 'metrics' AND table_schema = '...' -- Optionally, filter the schema as well, to avoid conflicts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With