153
153
id_param nom_option valid
156
create table t1 (F1 VARCHAR(30), F2 VARCHAR(30), F3 VARCHAR(30), cnt int, groupid int, KEY groupid_index (groupid));
157
insert into t1 (F1,F2,F3,cnt,groupid) values ('0','0','0',1,6),
158
('0','1','2',1,5), ('0','2','0',1,3), ('1','0','1',1,2),
159
('1','2','1',1,1), ('1','2','2',1,1), ('2','0','1',2,4),
161
delete from m1 using t1 m1,t1 m2 where m1.groupid=m2.groupid and (m1.cnt < m2.cnt or m1.cnt=m2.cnt and m1.F3>m2.F3);
172
156
create table t1 (c1 int, c2 char(6), c3 int);
173
157
create table t2 (c1 int, c2 char(6));
174
158
insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20);
192
create temporary table t1 (a int, b varchar(10), key b(b(5))) engine=myisam;
193
create temporary table t2 (a int, b varchar(10)) engine=myisam;
194
insert into t1 values ( 1, 'abcd1e');
195
insert into t1 values ( 2, 'abcd2e');
196
insert into t2 values ( 1, 'abcd1e');
197
insert into t2 values ( 2, 'abcd2e');
199
Table Op Msg_type Msg_text
200
test.t1 analyze status OK
201
test.t2 analyze status OK
202
update t1, t2 set t1.a = t2.a where t2.b = t1.b;
206
176
create table t1(f1 int, f2 int);
207
177
create table t2(f3 int, f4 int);
208
178
create index idx on t2(f3);
313
create table t1 (f1 int);
314
create table t2 (f2 int);
315
insert into t1 values(1),(2);
316
insert into t2 values(1),(1);
317
update t1,t2 set f1=3,f2=3 where f1=f2 and f1=1;
319
info: Rows matched: 3 Changed: 3 Warnings: 0
321
update t1 set f1=1 where f1=3;
322
update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1;
324
info: Rows matched: 3 Changed: 3 Warnings: 0
326
283
create table t1 (a int);
327
284
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
328
285
create table t2 (a int, filler1 char(200), filler2 char(200), key(a));