+--------------------+
| Database |
+--------------------+
| information_schema |
| book |
| cdcol |
| cooking |
| kisop |
| mysql |
| performance_schema |
| phpmyadmin |
| stafff |
| webauth |
+--------------------+
10 rows in set (0.00 sec)
mysql> USE cooking;
Database changed
mysql> SHOW TABLES;
+-------------------+
| Tables_in_cooking |
+-------------------+
| friends |
+-------------------+
1 row in set (0.00 sec)
mysql> SHOW FIELDS FROM friends;
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| no | int(11) | NO | PRI | 0 | |
| name | varchar(30) | YES | | NULL | |
| birth | date | YES | | NULL | |
| email | varchar(40) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
日本語を入れるのはこれを実行してから
mysql> SET NAMES cp932;
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO friends VALUES(1,'友子','1966-06-10',
-> 'tomoko@aaa.bbb');
ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
mysql> INSERT INTO friends VALUES('1','友子','1966-06-10'
-> 'tomoko@aaa.bbb');
前のデータを消す事。
ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
mysql> INSERT INTO friends VALUES(1,'友子','1966-06-10',
-> 'tomoko@aaa.bbb');
Query OK, 1 row affected (0.02 sec)
mysql>