#select 10.5 IN (SELECT * from t1 LIMIT 1 UNION SELECT 1.5);
906
906
#drop table t1;
907
907
#
925
925
#select ROW(1, 1, 'a') IN (select a,b,c from t1 where c='b' or c='a');
926
926
#select ROW(1, 2, 'a') IN (select a,b,c from t1 where c='b' or c='a');
927
927
#select ROW(1, 1, 'a') IN (select b,a,c from t1 where c='b' or c='a');
928
#--error ER_NOT_SUPPORTED_YET
928
#-- error 1235
929
929
#select ROW(1, 1, 'a') IN (select b,a,c from t1 limit 2);
930
930
#drop table t1;
931
931
#test of uncacheable subqueries
1036
1036
# error in IN
1037
1037
#
1038
1038
select t1.Continent, t2.Name, t2.Population from t1 LEFT JOIN t2 ON t1.Code = t2.Country where t2.Population IN (select max(t2.Population) AS Population from t2, t1 where t2.Country = t1.Code group by Continent);
#select * from t1 where s1 > (select max(s2) from t1);
1335
#--error ER_CANT_AGGREGATE_2COLLATIONS
1335
#-- error 1267
1336
1336
#select * from t1 where s1 > any (select max(s2) from t1);
1337
1337
#drop table t1;
1338
1338
#
2889
2889
id select_type table type possible_keys key key_len ref rows Extra
2890
2890
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using index
2891
2891
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
2892
2 DEPENDENT SUBQUERY t2 ref b b 5 3 Using where; Using index
2892
2 DEPENDENT SUBQUERY t2 ref b b 5 1 Using where; Using index
2893
2893
SELECT t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
2894
2894
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
2895
2895
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
4524
4524
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;
4525
4525
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 't1a ON 1' at line 1