# MySQLのヘルプの使い方
## とりあえず最初のhelpを表示する
``` mysql
mysql> help
For information about MySQL products and services, visit:
http://www.mysql.com/
...
-- help contents を入力しろと言われたので、そのとおりにする
For server side help, type 'help contents'
```
## help contents でヘルプのカテゴリ一覧を表示する
``` mysql
mysql> help contents
You asked for help about help category: "Contents"
For more information, type 'help <item>', where <item> is one of the following
categories:
Account Management
Administration -- データベースの管理や操作などはここに含まれる
Components
...
```
## help Administration を実行してみる
``` mysql
mysql> help Administration
You asked for help about help category: "Administration"
For more information, type 'help <item>', where <item> is one of the following
topics:
BINLOG
CACHE INDEX
FLUSH
...
SHOW COLUMNS -- テーブル定義を見るコマンドのヘルプ
...
```
## help SHOW COLUMNS を実行してみる
``` mysql
mysql> help SHOW COLUMNS
Name: 'SHOW COLUMNS'
Description:
Syntax:
SHOW [EXTENDED] [FULL] {COLUMNS | FIELDS}
{FROM | IN} tbl_name
[{FROM | IN} db_name]
[LIKE 'pattern' | WHERE expr]
...
```
## ヘルプに書かれたとおりにコマンドを実行してみる
``` mysql
mysql> SHOW TABLES;
+-------------------+
| Tables_in_sandbox |
+-------------------+
| users |
+-------------------+
1 row in set (0.00 sec)
mysql> SHOW COLUMNS FROM users;
+-------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+----------------+
| id | int(10) | NO | PRI | NULL | auto_increment |
| name | varchar(64) | NO | | NULL | |
+-------+-------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)
```