mysql のメタコマンドに『\G』っていう便利なのがあるのを今日、というかさっき知った。
SQL文の最後に「\G」ってつけると、問い合わせ結果をたてに表示してくれるというもの。
mogilefs> select * from device; +-------+--------+--------+--------+----------+---------+------------+ | devid | hostid | status | weight | mb_total | mb_used | mb_asof | +-------+--------+--------+--------+----------+---------+------------+ | 1 | 1 | alive | 100 | 2015 | 756 | 1158770599 | | 2 | 1 | alive | 100 | 2015 | 756 | 1158770599 | +-------+--------+--------+--------+----------+---------+------------+ 2 rows in set (0.00 sec) mogilefs> mogilefs> select * from device \G *************************** 1. row *************************** devid: 1 hostid: 1 status: alive weight: 100 mb_total: 2015 mb_used: 756 mb_asof: 1158770599 *************************** 2. row *************************** devid: 2 hostid: 1 status: alive weight: 100 mb_total: 2015 mb_used: 756 mb_asof: 1158770599 2 rows in set (0.00 sec)
これは素敵だ。いままで、ウインドウ最大化とか一時的にしてた。。。もっと早くにしってれば。。。

- MySQL全機能リファレンス
- 鈴木 啓修
- 技術評論社 2004-11
- 売り上げランキング : 33987
- 評価
- おすすめ平均

最高のMySQLリファレンス本
これ一冊あればOK
予想とは違っていましたが
リファレンスマニュアルの決定版
かなりいいかもしれない・・
- 曲名リスト
by G-Tools , 2006/09/21

コメントする