MySQL can returns nice looking set of results from your query. Simply use the --table
or -t
option.
Here is an example. It describes the Indicator table from my htstbot database.
echo 'describe Indicator' | mysql -uroot htstbot -t +-----------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+---------------+------+-----+---------+-------+ | ticker_id | int(11) | NO | PRI | NULL | | | date | date | NO | PRI | NULL | | | name | varchar(100) | NO | PRI | NULL | | | input | varchar(100) | NO | PRI | NULL | | | type | tinyint(4) | YES | | NULL | | | value | decimal(17,6) | NO | | NULL | | | note | varchar(255) | YES | | NULL | | +-----------+---------------+------+-----+---------+-------+