MySQL Workbenchでデータベースからインポートしてみる
MySQL Workbenchでデータベースからインポートしてみる。
データベースの準備
VirtualBox上のMySQLでサンプルのデータベースを用意する。
> create database test; > use test > create table sample1 ( id int, c1 varchar(16), c2 varchar(16) ); > create table sample2 ( id int );
テーブル定義を変更
下記のSQLを実行し、テーブルの定義を変更してみる。
> drop table sample1; > drop table sample2; > create table sample1 ( id int, c1 varchar(32), c3 varchar(16) ); > create table sample3 ( id int );