2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
drop database if exists mysqltest;
8
create database mysqltest;
9
create table mysqltest.t1 ( n int);
10
alter table mysqltest.t1 add m int;
11
insert into mysqltest.t1 values (1,2);
12
create table mysqltest.t2 (n int);
13
insert into mysqltest.t2 values (45);
14
rename table mysqltest.t2 to mysqltest.t3, mysqltest.t1 to mysqltest.t2;
15
select * from mysqltest.t2;
18
select * from mysqltest.t3;
21
drop database mysqltest;