lowercase_table.result 1.11 KB
Newer Older
1
drop table if exists t1,t2,t3,t4,T1;
2
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
3
create table t4 (id int primary key, Word varchar(40) not null);
4
INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
5
INSERT INTO T4 VALUES(1,'match');
6 7 8 9 10
SELECT * FROM t1;
id	Word
1	a
2	b
3	c
11 12 13 14 15 16
SELECT T1.id from T1 LIMIT 1;
id
1
SELECT T2.id from t1 as T2 LIMIT 1;
id
1
17 18 19
SELECT * from t1 left join t4 on (test.t1.id= TEST.t4.id) where TEST.t1.id >= test.t4.id;
id	Word	id	Word
1	a	1	match
20 21
SELECT T2.id from t1 as t2 LIMIT 1;
Unknown table 'T2' in field list
22 23 24 25 26 27
RENAME TABLE T1 TO T2;
ALTER TABLE T2 ADD new_col int not null;
ALTER TABLE T2 RENAME T3;
show tables like 't_';
Tables_in_test (t_)
t3
28 29
t4
drop table t3,t4;
30 31 32 33 34 35 36 37
create table t1 (a int);
select count(*) from T1;
count(*)
0
select count(*) from t1;
count(*)
0
select count(T1.a) from t1;
38
Unknown table 'T1' in field list
39 40 41
select count(bags.a) from t1 as Bags;
Unknown table 'bags' in field list
drop table t1;
42 43 44 45 46 47 48 49 50
create database foo;
use foo;
create table t1 (a int);
select FOO.t1.* from FOO.t1;
a
alter table t1 rename to T1;
select FOO.t1.* from FOO.t1;
a
drop database FOO;