17
17
CREATE TABLE t3 (a int not null, b char (10) not null);
18
18
insert into t3 values (3,'f'),(4,'y'),(5,'z'),(6,'c');
19
19
select t1.a,t4.y from t1,(select t2.a as y from t2,(select t3.b from t3 where t3.a>3) as t5 where t2.b=t5.b) as t4 where t1.a = t4.y;
21
21
SELECT a FROM (SELECT 1 FROM (SELECT 1) a HAVING a=1) b;
23
23
SELECT a,b as a FROM (SELECT '1' as a,'2' as b) b HAVING a=1;
24
24
SELECT a,2 as a FROM (SELECT '1' as a) b HAVING a=2;
25
25
SELECT a,2 as a FROM (SELECT '1' as a) b HAVING a=1;
27
27
SELECT 1 FROM (SELECT 1) a WHERE a=2;
29
29
SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1) as a;
30
31
select * from t1 as x1, (select * from t1) as x2;
31
32
explain select * from t1 as x1, (select * from t1) as x2;
32
33
drop table if exists t2,t3;