データベース試作2
- id は自動的にインクリメントしてあげたい。
mysql> alter table conveni modify id int auto_increment; Query OK, 0 rows affected (0.01 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> alter table store modify id int auto_increment; Query OK, 0 rows affected (0.01 sec) Records: 0 Duplicates: 0 Warnings: 0
- カラムを指定した位置に追加してあげたい。
mysql> alter table store add name varchar(100) after conid; Query OK, 0 rows affected (0.01 sec) Records: 0 Duplicates: 0 Warnings: 0
- データの格納
mysql> insert into conveni -> (null,'エーエム・ピーエム'), -> (null,'サンクス'), -> (null,'スリーエフ'), -> (null,'セブンイレブン'), -> (null,'デイリーヤマザキ'), -> (null,'ナチュラルローソン'), -> (null,'ファミリーマート'), -> (null,'ミニストップ'), -> (null,'ローソンストア100'), -> (null,'ローソン');
すると、
現在のエンコーディングutf-8に合わないデータを受信しました。
って怒られた(;;
…明日またエンコーディングの設定からやります。