Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table ten(a int);
- insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
- create table t1 (a int, b int, c int, key(a));
- insert into t1 select a,a,a from ten;
- create table t2 as select * from t1;
- create table t3 as select * from t1;
- set optimizer_switch='firstmatch=off';
- update t1, t2 set t2.c=1000 where t1.a=t2.a and t1.b in (select b from t3 where t3.c<= t2.c) order by t2.c, t1.c limit 10;
Add Comment
Please, Sign In to add comment