MySQL
参考 - Reference(http://stackoverflow.com/questions/2719550/mysql-table-export-to-html)
テーブル作成 - Create table
mysql -u root mysql> use test; Database changed mysql> create table tweets (id integer primary key, contents varchar(140)); Query OK, 0 rows affected (0.59 sec) mysql> desc tweets; +----------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+---------+-------+ | id | int(11) | NO | PRI | NULL | | | contents | varchar(140) | YES | | NULL | | +----------+--------------+------+-----+---------+-------+ 2 rows in set (0.15 sec) mysql> exit Bye
HTML ダンプ - Dump HTML
mysql -u root -H -e "use test; desc tweets;"; # <TABLE BORDER=1><TR><TH>Field</TH><TH>Type</TH><TH>Null</TH><TH>Key</TH><TH>Default</TH><TH>Extra</TH></TR><TR><TD>id</TD><TD>int(11)</TD><TD>NO</TD><TD>PRI</TD><TD>NULL</TD><TD></TD></TR><TR><TD>contents</TD><TD>varchar(140)</TD><TD>YES</TD><TD></TD><TD>NULL</TD><TD></TD></TR></TABLE>
html ファイルに保存して表示しました。 - I stored as html file and showed it on browser.
おお、べんりですね。 - Wow, it's nice :)
PostgreSQL
参考 - Reference(http://www.postgresql.jp/document/pg721doc/reference/app-psql.html)
具体例は省略しますが、psql コマンド後に \H して \d [table_name] でできます。 - I omitted an example, but you can do same thing to type psql, \H, and \d [table_name] .