0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

便利なSQLコマンド

Posted at

個人的に便利だと思ったSQLコマンドを書きなぐっていきます。備忘録です。

\g

表示結果を縦に表示してくれるとても素晴らしい機能

mysql> select * from test;
+-------+--------+--------+--------+
| id    | hostid | status | type   |
+-------+--------+--------+--------+
|     1 |      1 | true   |    a   |
|     2 |      1 | true   |    b   |
+-------+--------+--------+--------+

mysql> select * from test \G
*************************** 1. row ***************************
   id: 1
  hostid: 1
  status: true
  type: a
*************************** 2. row ***************************
   devid: 2
  hostid: 1
  status: true
  type: b
2 rows in set (0.00 sec)

気になるコマンド見つけたら随時更新予定
他にも皆さんの「こんなのも便利!」などのコメント待ってます。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?