通常、MySQLで結果を表示すると以下のように出力されます。
mysql> SELECT * FROM test; +--------+------+ | name | tell | +--------+------+ | sasuke | 123 | | yamada | 445 | | katou | 445 | +--------+------+ 3 rows in set (0.00 sec)
MySQL では接続時に -H を指定することで、結果を HTML 形式で表示することができます。
以下は、実際の使用例です。
コマンド実行例
C:Userssasuke>mysql -u root -p -D sasuke -H Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 7 Server version: 5.0.86-community-nt MySQL Community Edition (GPL) Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql> SELECT * FROM test;
name | tell |
---|---|
sasuke | 123 |
yamada | 445 |
katou | 445 |