1 echo create table t1(f1 int,f2 int,f3 int);
2 create table t1(f1 int,f2 int,f3 int);
3 echo create index idx1 on t1(f3,f2);
4 create index idx1 on t1(f3,f2);
5 echo insert into t1 values(1,10,100);
6 insert into t1 values(1,10,100);
7 echo insert into t1 values(3,33,333);
8 insert into t1 values(3,33,333);
9 echo insert into t1 values(2,33,444);
10 insert into t1 values(2,33,444);
11 echo set autocommit off;
13 echo insert into t1 values(4,40,400);
14 insert into t1 values(4,40,400);
15 echo insert into t1 values(3,33,333);
16 insert into t1 values(3,33,333);
17 echo select * from t1;
21 echo select * from t1;
25 echo select * from t1;
27 echo insert into t1 values(4,40,400);
28 insert into t1 values(4,40,400);
29 echo insert into t1 values(3,33,333);
30 insert into t1 values(3,33,333);
31 echo select * from t1;
35 echo select * from t1;
39 echo select * from t1;
41 echo update t1 set f1=20 where f1=2;
42 update t1 set f1=20 where f1=2;
43 echo select * from t1 where f1=20;
44 select * from t1 where f1=20;
45 echo update t1 set f2=333 where f3=444;
46 update t1 set f2=333 where f3=444;
47 echo select * from t1 where f3=444;
48 select * from t1 where f3=444;
49 echo select * from t1;
51 echo update t1 set f1=1,f2=10 where f1=20;
52 update t1 set f1=1,f2=10 where f1=20;
53 echo select * from t1;
57 echo select * from t1 where f1=33;
58 select * from t1 where f1=33;
59 echo select * from t1 where f1=2;
60 select * from t1 where f1=2;
61 echo select * from t1 where f1=2 and f2=33;
62 select * from t1 where f1=2 and f2=33;
63 echo update t1 set f1=20 where f1=2;
64 update t1 set f1=20 where f1=2;
65 echo select * from t1 where f1=20;
66 select * from t1 where f1=20;
67 echo update t1 set f2=333 where f3=444;
68 update t1 set f2=333 where f3=444;
69 echo select * from t1;
71 echo select * from t1 where f3=444;
72 select * from t1 where f3=444;
73 echo select * from t1;
75 echo update t1 set f1=1,f2=10 where f1=20;
76 update t1 set f1=1,f2=10 where f1=20;
77 echo select * from t1;
83 echo select * from t1 where f1=1;
84 select * from t1 where f1=1;
85 echo select * from t1 where f1=2;
86 select * from t1 where f1=2;
87 echo select * from t1 where f1=2 and f2=33;
88 select * from t1 where f1=2 and f2=33;
89 echo select * from t1;
91 echo delete from t1 where f3=333 and f2=33;
92 delete from t1 where f3=333 and f2=33;
93 echo select * from t1;
95 echo delete from t1 where f2 in(10,40) and f3 in(400,10);
96 delete from t1 where f2 in(10,40) and f3 in(400,10);
97 echo select * from t1;
99 echo delete from t1 where f2 between 33 and 45;
100 delete from t1 where f2 between 33 and 45;
101 echo select * from t1;
105 echo select * from t1;
109 echo select * from t1;
111 echo delete from t1 where f3=333 and f2=33;
112 delete from t1 where f3=333 and f2=33;
113 echo select * from t1;
115 echo delete from t1 where f2 in(10,40) and f3 in(400,10);
116 delete from t1 where f2 in(10,40) and f3 in(400,10);
117 echo select * from t1;
121 echo delete from t1 where f2 between 33 and 45;
122 delete from t1 where f2 between 33 and 45;
123 echo select * from t1;
127 echo select * from t1;
129 echo select * from t1;