1
DROP TABLE IF EXISTS t1,t2,t3,t2aA,t1Aa;
2
DROP DATABASE IF EXISTS `TEST_$1`;
3
DROP DATABASE IF EXISTS `test_$1`;
4
DROP DATABASE IF EXISTS mysqltest_LC2;
5
CREATE TABLE T1 (a int);
6
INSERT INTO T1 VALUES (1);
10
SHOW TABLES LIKE "t1";
15
T1 CREATE TABLE `T1` (
16
`a` int(11) DEFAULT NULL
17
) ENGINE=MyISAM DEFAULT CHARSET=latin1
18
RENAME TABLE T1 TO T2;
19
SHOW TABLES LIKE "T2";
25
RENAME TABLE T2 TO t3;
26
SHOW TABLES LIKE "T3";
29
RENAME TABLE T3 TO T1;
30
SHOW TABLES LIKE "T1";
33
ALTER TABLE T1 add b int;
34
SHOW TABLES LIKE "T1";
37
ALTER TABLE T1 RENAME T2;
38
SHOW TABLES LIKE "T2";
42
ALTER TABLE T2 drop b;
43
SHOW TABLES LIKE "T2";
47
RENAME TABLE T2 TO T1;
48
SHOW TABLES LIKE "T1";
55
CREATE DATABASE `TEST_$1`;
56
SHOW DATABASES LIKE "TEST%";
59
DROP DATABASE `test_$1`;
60
CREATE TABLE T1 (a int) engine=innodb;
61
INSERT INTO T1 VALUES (1);
62
SHOW TABLES LIKE "T1";
65
SHOW TABLES LIKE "t1";
70
T1 CREATE TABLE `T1` (
71
`a` int(11) DEFAULT NULL
72
) ENGINE=InnoDB DEFAULT CHARSET=latin1
73
RENAME TABLE T1 TO T2;
74
SHOW TABLES LIKE "T2";
80
RENAME TABLE T2 TO t3;
81
SHOW TABLES LIKE "T3";
84
RENAME TABLE T3 TO T1;
85
SHOW TABLES LIKE "T1";
88
ALTER TABLE T1 add b int;
89
SHOW TABLES LIKE "T1";
92
ALTER TABLE T1 RENAME T2;
93
SHOW TABLES LIKE "T2";
97
ALTER TABLE T2 drop b;
98
SHOW TABLES LIKE "T2";
102
RENAME TABLE T2 TO T1;
103
SHOW TABLES LIKE "T1";
110
create table T1 (EVENT_ID int auto_increment primary key, LOCATION char(20));
111
insert into T1 values (NULL,"Mic-4"),(NULL,"Mic-5"),(NULL,"Mic-6");
112
SELECT LOCATION FROM T1 WHERE EVENT_ID=2 UNION ALL SELECT LOCATION FROM T1 WHERE EVENT_ID=3;
116
SELECT LOCATION FROM T1 WHERE EVENT_ID=2 UNION ALL SELECT LOCATION FROM T1 WHERE EVENT_ID=3;
120
SELECT LOCATION FROM T1 WHERE EVENT_ID=2 UNION ALL SELECT LOCATION FROM T1 WHERE EVENT_ID=3;
125
create table T1 (A int);
126
alter table T1 add index (A);
127
show tables like 'T1%';
130
alter table t1 add index (A);
131
show tables like 't1%';
135
create temporary table T1(a int(11), b varchar(8));
136
insert into T1 values (1, 'abc');
140
alter table T1 add index (a);
145
create database mysqltest_LC2;
147
create table myUC (i int);
148
insert into myUC values (1),(2),(3);
155
drop database mysqltest_LC2;
156
create database mysqltest_LC2;
158
create table myUC (i int);
162
drop database mysqltest_LC2;
163
create table t2aA (col1 int);
164
create table t1Aa (col1 int);
165
select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1;
167
drop table t2aA, t1Aa;
168
create database mysqltest_LC2;
170
create table myUC (i int);
171
select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES
172
where TABLE_SCHEMA ='mysqltest_LC2';
173
TABLE_SCHEMA TABLE_NAME
176
drop database mysqltest_LC2;