You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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> 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> 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> 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> SHOW TABLES;
+-------------------+
| Tables_in_sandbox |
+-------------------+
| users |
+-------------------+1 row inset (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 inset (0.00 sec)