2 echo "----------Table having single field f1 and index on t1(f1)--------------";
3 echo create table t1
(f1 int
);
5 echo create index idx1 on t1
(f1
);
7 echo insert into t1 values
(10);
8 Statement Executed
: Rows Affected
= 1
9 echo insert into t1 values
(21);
10 Statement Executed
: Rows Affected
= 1
11 echo insert into t1 values
(32);
12 Statement Executed
: Rows Affected
= 1
13 echo insert into t1 values
(123);
14 Statement Executed
: Rows Affected
= 1
15 echo insert into t1 values
(-2147483648);
16 Statement Executed
: Rows Affected
= 1
17 echo insert into t1 values
(2147483647);
18 Statement Executed
: Rows Affected
= 1
19 echo select * from t1 where f1
>-5;
20 ---------------------------------------------------------
22 ---------------------------------------------------------
29 echo select * from t1 where f1
<-10;
30 ---------------------------------------------------------
32 ---------------------------------------------------------
35 echo select f1 from t1 where f1
in (10,30,123);
36 ---------------------------------------------------------
38 ---------------------------------------------------------
42 echo select * from t1
;
43 ---------------------------------------------------------
45 ---------------------------------------------------------
53 echo update t1
set f1
=25 where f1
=21;
54 Statement Executed
: Rows Affected
= 1
55 echo select * from t1
;
56 ---------------------------------------------------------
58 ---------------------------------------------------------
66 echo update t1
set f1
=1010101 where f1
in(32,10,40);
67 Statement Executed
: Rows Affected
= 2
68 echo select * from t1
;
69 ---------------------------------------------------------
71 ---------------------------------------------------------
79 echo update t1
set f1
=987654 where f1 between
25 and
200;
80 Statement Executed
: Rows Affected
= 2
81 echo select * from t1
;
82 ---------------------------------------------------------
84 ---------------------------------------------------------
92 echo delete from t1 where f1
=2147483647;
93 Statement Executed
: Rows Affected
= 1
94 echo select * from t1
;
95 ---------------------------------------------------------
97 ---------------------------------------------------------
104 echo delete from t1 where f1 between
25 and
6000000;
105 Statement Executed
: Rows Affected
= 4
106 echo select * from t1
;
107 ---------------------------------------------------------
109 ---------------------------------------------------------
113 Statement Executed
: Rows Affected
= 1
114 echo select * from t1
;
115 ---------------------------------------------------------
117 ---------------------------------------------------------
121 echo "-----Table having two fields f1 int,f2 int and index on t1(f1)-----";
122 echo create table t1
(f1 int
,f2 int
);
124 echo create index idx1 on t1
(f1
);
126 echo insert into t1 values
(10,2147483647);
127 Statement Executed
: Rows Affected
= 1
128 echo insert into t1 values
(21,-2147483648);
129 Statement Executed
: Rows Affected
= 1
130 echo insert into t1 values
(32,1000000000);
131 Statement Executed
: Rows Affected
= 1
132 echo insert into t1 values
(123,999999999);
133 Statement Executed
: Rows Affected
= 1
134 echo insert into t1 values
(-2147483648,0);
135 Statement Executed
: Rows Affected
= 1
136 echo insert into t1 values
(2147483647,-2147483648);
137 Statement Executed
: Rows Affected
= 1
138 echo insert into t1 values
(123,9);
139 Statement Executed
: Rows Affected
= 1
140 echo select * from t1
;
141 ---------------------------------------------------------
143 ---------------------------------------------------------
149 2147483647 -2147483648
152 echo select * from t1 where f1
>-5;
153 ---------------------------------------------------------
155 ---------------------------------------------------------
160 2147483647 -2147483648
163 echo select * from t1 where f1
<-10;
164 ---------------------------------------------------------
166 ---------------------------------------------------------
169 echo select f1 from t1 where f1
in (10,30,123);
170 ---------------------------------------------------------
172 ---------------------------------------------------------
177 echo select * from t1
;
178 ---------------------------------------------------------
180 ---------------------------------------------------------
186 2147483647 -2147483648
189 echo update t1
set f1
=25 where f1
=21;
190 Statement Executed
: Rows Affected
= 1
191 echo select * from t1
;
192 ---------------------------------------------------------
194 ---------------------------------------------------------
200 2147483647 -2147483648
203 echo update t1
set f1
=21 where f1
=25 and f2
=-2147483648;
204 Statement Executed
: Rows Affected
= 1
205 echo select * from t1
;
206 ---------------------------------------------------------
208 ---------------------------------------------------------
214 2147483647 -2147483648
217 echo update t1
set f1
=1010101 where f1
in(32,10,40);
218 Statement Executed
: Rows Affected
= 2
219 echo select * from t1
;
220 ---------------------------------------------------------
222 ---------------------------------------------------------
228 2147483647 -2147483648
231 echo update t1
set f1
=7777 where f1
=1010101 and f2
in(1000000000,999999999);
232 Statement Executed
: Rows Affected
= 1
233 echo select * from t1
;
234 ---------------------------------------------------------
236 ---------------------------------------------------------
242 2147483647 -2147483648
245 echo update t1
set f1
=2020202 where f2
in(1000000000,999999999) and f1
>=7777;
246 Statement Executed
: Rows Affected
= 1
247 echo select * from t1
;
248 ---------------------------------------------------------
250 ---------------------------------------------------------
256 2147483647 -2147483648
259 echo update t1
set f1
=987654 where f1 between
25 and
200;
260 Statement Executed
: Rows Affected
= 2
261 echo select * from t1
;
262 ---------------------------------------------------------
264 ---------------------------------------------------------
270 2147483647 -2147483648
273 echo delete from t1 where f1
=2147483647;
274 Statement Executed
: Rows Affected
= 1
275 echo select * from t1
;
276 ---------------------------------------------------------
278 ---------------------------------------------------------
286 echo delete from t1 where f1 between
25 and
6000000;
287 Statement Executed
: Rows Affected
= 4
288 echo select * from t1
;
289 ---------------------------------------------------------
291 ---------------------------------------------------------
296 Statement Executed
: Rows Affected
= 2
297 echo select * from t1
;
298 ---------------------------------------------------------
300 ---------------------------------------------------------
304 echo "--Table having 5 fields f1,f2,f3,f4,f5(all int) index on t1(f1,f2)--";
305 echo create table t1
(f1 int
,f2 int
,f3 int
,f4 int
,f5 int
);
307 echo create index idx1 on t1
(f1
,f2
);
309 echo insert into t1 values
(11,222,3333,44444,555555);
310 Statement Executed
: Rows Affected
= 1
311 echo insert into t1 values
(12,123,1234,12345,123456);
312 Statement Executed
: Rows Affected
= 1
313 echo insert into t1 values
(234,4567,56789,1234,4321);
314 Statement Executed
: Rows Affected
= 1
315 echo insert into t1 values
(-2147483647,1,101,212,2147483647);
316 Statement Executed
: Rows Affected
= 1
317 echo insert into t1 values
(101,12121,0,32123,78987);
318 Statement Executed
: Rows Affected
= 1
319 echo insert into t1 values
(12,123,1000,1111,1);
320 Statement Executed
: Rows Affected
= 1
321 echo select * from t1
;
322 ---------------------------------------------------------
323 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
324 ---------------------------------------------------------
325 11 222 3333 44444 555555
326 12 123 1234 12345 123456
327 234 4567 56789 1234 4321
328 -2147483647 1 101 212 2147483647
329 101 12121 0 32123 78987
332 echo select * from t1 where f1
>0 and f2
<=222 and f3
=3333 and f4
>44443 and f5
!=555550;
333 ---------------------------------------------------------
334 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
335 ---------------------------------------------------------
336 11 222 3333 44444 555555
338 echo select f1
,f3
,f5 from t1 where f1
=234 or f5
>4000 or f3
>=50000;
339 ---------------------------------------------------------
341 ---------------------------------------------------------
345 -2147483647 101 2147483647
348 echo select * from t1 where f1
<-1 and f2
>=1 or f3
=101;
349 ---------------------------------------------------------
350 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
351 ---------------------------------------------------------
352 -2147483647 1 101 212 2147483647
354 echo select * from t1 where f1
<-1 and f2
>=1 or f3
=1234;
355 ---------------------------------------------------------
356 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
357 ---------------------------------------------------------
358 12 123 1234 12345 123456
359 -2147483647 1 101 212 2147483647
361 echo select * from t1
;
362 ---------------------------------------------------------
363 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
364 ---------------------------------------------------------
365 11 222 3333 44444 555555
366 12 123 1234 12345 123456
367 234 4567 56789 1234 4321
368 -2147483647 1 101 212 2147483647
369 101 12121 0 32123 78987
372 echo update t1
set f1
=22 where f1
=11;
373 Statement Executed
: Rows Affected
= 1
374 echo select * from t1
;
375 ---------------------------------------------------------
376 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
377 ---------------------------------------------------------
378 22 222 3333 44444 555555
379 12 123 1234 12345 123456
380 234 4567 56789 1234 4321
381 -2147483647 1 101 212 2147483647
382 101 12121 0 32123 78987
385 echo update t1
set f1
=11 where f1
=22 and f2
=222;
386 Statement Executed
: Rows Affected
= 1
387 echo select * from t1
;
388 ---------------------------------------------------------
389 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
390 ---------------------------------------------------------
391 11 222 3333 44444 555555
392 12 123 1234 12345 123456
393 234 4567 56789 1234 4321
394 -2147483647 1 101 212 2147483647
395 101 12121 0 32123 78987
398 echo update t1
set f1
=10 where f1
in(234,10);
399 Statement Executed
: Rows Affected
= 1
400 echo select * from t1
;
401 ---------------------------------------------------------
402 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
403 ---------------------------------------------------------
404 11 222 3333 44444 555555
405 12 123 1234 12345 123456
406 10 4567 56789 1234 4321
407 -2147483647 1 101 212 2147483647
408 101 12121 0 32123 78987
411 echo update t1
set f2
=100 where f1
in(12,10);
412 Statement Executed
: Rows Affected
= 3
413 echo select * from t1
;
414 ---------------------------------------------------------
415 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
416 ---------------------------------------------------------
417 11 222 3333 44444 555555
418 12 100 1234 12345 123456
419 10 100 56789 1234 4321
420 -2147483647 1 101 212 2147483647
421 101 12121 0 32123 78987
424 echo update t1
set f2
=222 where f3
=56789 and f2
in(100,4567) and f4 between
100 and
20000;
425 Statement Executed
: Rows Affected
= 1
426 echo select * from t1
;
427 ---------------------------------------------------------
428 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
429 ---------------------------------------------------------
430 11 222 3333 44444 555555
431 12 100 1234 12345 123456
432 10 222 56789 1234 4321
433 -2147483647 1 101 212 2147483647
434 101 12121 0 32123 78987
437 echo update t1
set f2
=5 where f3
=56789 or f2
in(123,222) or f4 between
100 and
20000;
438 Statement Executed
: Rows Affected
= 5
439 echo select * from t1
;
440 ---------------------------------------------------------
441 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
442 ---------------------------------------------------------
443 11 5 3333 44444 555555
444 12 5 1234 12345 123456
446 -2147483647 5 101 212 2147483647
447 101 12121 0 32123 78987
450 echo update t1
set f2
=101,f2
=12121 where f3
=0;
451 Statement Executed
: Rows Affected
= 1
452 echo select * from t1
;
453 ---------------------------------------------------------
454 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
455 ---------------------------------------------------------
456 11 5 3333 44444 555555
457 12 5 1234 12345 123456
459 -2147483647 5 101 212 2147483647
460 101 12121 0 32123 78987
463 echo update t1
set f1
=2020202 where f1
in(-2147483647,2147483647) or f1
>=7777;
464 Statement Executed
: Rows Affected
= 1
465 echo select * from t1
;
466 ---------------------------------------------------------
467 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
468 ---------------------------------------------------------
469 11 5 3333 44444 555555
470 12 5 1234 12345 123456
472 2020202 5 101 212 2147483647
473 101 12121 0 32123 78987
476 echo update t1
set f1
=987654 where f1 between
25 and
200;
477 Statement Executed
: Rows Affected
= 1
478 echo select * from t1
;
479 ---------------------------------------------------------
480 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
481 ---------------------------------------------------------
482 11 5 3333 44444 555555
483 12 5 1234 12345 123456
485 2020202 5 101 212 2147483647
486 987654 12121 0 32123 78987
489 echo delete from t1 where f1
=2147483647;
490 Statement Executed
: Rows Affected
= 0
491 echo select * from t1
;
492 ---------------------------------------------------------
493 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
494 ---------------------------------------------------------
495 11 5 3333 44444 555555
496 12 5 1234 12345 123456
498 2020202 5 101 212 2147483647
499 987654 12121 0 32123 78987
502 echo delete from t1 where f1 between
25 and
6000000;
503 Statement Executed
: Rows Affected
= 2
504 echo select * from t1
;
505 ---------------------------------------------------------
506 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
507 ---------------------------------------------------------
508 11 5 3333 44444 555555
509 12 5 1234 12345 123456
514 Statement Executed
: Rows Affected
= 4
515 echo select * from t1
;
516 ---------------------------------------------------------
517 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
518 ---------------------------------------------------------
522 echo "--Table having 5 fields f1,f2,f3,f4,f5(all int) index on t1(f1,f3)--";
523 echo create table t1
(f1 int
,f2 int
,f3 int
,f4 int
,f5 int
);
525 echo create index idx1 on t1
(f1
,f3
);
527 echo insert into t1 values
(11,222,3333,44444,555555);
528 Statement Executed
: Rows Affected
= 1
529 echo insert into t1 values
(12,123,1234,12345,123456);
530 Statement Executed
: Rows Affected
= 1
531 echo insert into t1 values
(234,4567,56789,1234,4321);
532 Statement Executed
: Rows Affected
= 1
533 echo insert into t1 values
(-2147483648,1,101,212,2147483647);
534 Statement Executed
: Rows Affected
= 1
535 echo insert into t1 values
(101,12121,0,32123,78987);
536 Statement Executed
: Rows Affected
= 1
537 echo insert into t1 values
(12,100,1234,1111,1);
538 Statement Executed
: Rows Affected
= 1
539 echo select * from t1
;
540 ---------------------------------------------------------
541 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
542 ---------------------------------------------------------
543 11 222 3333 44444 555555
544 12 123 1234 12345 123456
545 234 4567 56789 1234 4321
546 -2147483648 1 101 212 2147483647
547 101 12121 0 32123 78987
550 echo select * from t1 where f1
>0 and f2
<=222 and f3
=3333 and f4
>44443 and f5
!=555550;
551 ---------------------------------------------------------
552 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
553 ---------------------------------------------------------
554 11 222 3333 44444 555555
556 echo select f1
,f3
,f5 from t1 where f1
=234 or f5
>4000 or f3
>=50000;
557 ---------------------------------------------------------
559 ---------------------------------------------------------
563 -2147483648 101 2147483647
566 echo select * from t1 where f1
<-1 and f2
>=1 or f3
=101;
567 ---------------------------------------------------------
568 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
569 ---------------------------------------------------------
570 -2147483648 1 101 212 2147483647
572 echo select * from t1 where f1
<-1 and f2
>=1 or f3
=1234;
573 ---------------------------------------------------------
574 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
575 ---------------------------------------------------------
576 12 123 1234 12345 123456
577 -2147483648 1 101 212 2147483647
580 echo select * from t1
;
581 ---------------------------------------------------------
582 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
583 ---------------------------------------------------------
584 11 222 3333 44444 555555
585 12 123 1234 12345 123456
586 234 4567 56789 1234 4321
587 -2147483648 1 101 212 2147483647
588 101 12121 0 32123 78987
591 echo update t1
set f1
=22 where f1
=11;
592 Statement Executed
: Rows Affected
= 1
593 echo select * from t1
;
594 ---------------------------------------------------------
595 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
596 ---------------------------------------------------------
597 22 222 3333 44444 555555
598 12 123 1234 12345 123456
599 234 4567 56789 1234 4321
600 -2147483648 1 101 212 2147483647
601 101 12121 0 32123 78987
604 echo update t1
set f1
=11 where f1
=22 and f2
=222;
605 Statement Executed
: Rows Affected
= 1
606 echo select * from t1
;
607 ---------------------------------------------------------
608 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
609 ---------------------------------------------------------
610 11 222 3333 44444 555555
611 12 123 1234 12345 123456
612 234 4567 56789 1234 4321
613 -2147483648 1 101 212 2147483647
614 101 12121 0 32123 78987
617 echo update t1
set f1
=10 where f1
in(234,10);
618 Statement Executed
: Rows Affected
= 1
619 echo select * from t1
;
620 ---------------------------------------------------------
621 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
622 ---------------------------------------------------------
623 11 222 3333 44444 555555
624 12 123 1234 12345 123456
625 10 4567 56789 1234 4321
626 -2147483648 1 101 212 2147483647
627 101 12121 0 32123 78987
630 echo update t1
set f2
=100 where f1
in(12,10);
631 Statement Executed
: Rows Affected
= 3
632 echo select * from t1
;
633 ---------------------------------------------------------
634 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
635 ---------------------------------------------------------
636 11 222 3333 44444 555555
637 12 100 1234 12345 123456
638 10 100 56789 1234 4321
639 -2147483648 1 101 212 2147483647
640 101 12121 0 32123 78987
643 echo update t1
set f2
=222 where f3
=56789 and f2
in(100,4567) and f4 between
100 and
20000;
644 Statement Executed
: Rows Affected
= 1
645 echo select * from t1
;
646 ---------------------------------------------------------
647 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
648 ---------------------------------------------------------
649 11 222 3333 44444 555555
650 12 100 1234 12345 123456
651 10 222 56789 1234 4321
652 -2147483648 1 101 212 2147483647
653 101 12121 0 32123 78987
656 echo update t1
set f2
=5 where f3
=56789 or f2
in(123,222) or f4 between
100 and
20000;
657 Statement Executed
: Rows Affected
= 5
658 echo select * from t1
;
659 ---------------------------------------------------------
660 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
661 ---------------------------------------------------------
662 11 5 3333 44444 555555
663 12 5 1234 12345 123456
665 -2147483648 5 101 212 2147483647
666 101 12121 0 32123 78987
669 echo update t1
set f2
=101,f2
=12121 where f3
=0;
670 Statement Executed
: Rows Affected
= 1
671 echo select * from t1
;
672 ---------------------------------------------------------
673 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
674 ---------------------------------------------------------
675 11 5 3333 44444 555555
676 12 5 1234 12345 123456
678 -2147483648 5 101 212 2147483647
679 101 12121 0 32123 78987
682 echo update t1
set f1
=2020202 where f1
in(-2147483647,2147483647) or f1
>=7777;
683 Statement Executed
: Rows Affected
= 0
684 echo select * from t1
;
685 ---------------------------------------------------------
686 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
687 ---------------------------------------------------------
688 11 5 3333 44444 555555
689 12 5 1234 12345 123456
691 -2147483648 5 101 212 2147483647
692 101 12121 0 32123 78987
695 echo update t1
set f1
=987654 where f1 between
25 and
200 and f3
>=4000;
696 Statement Executed
: Rows Affected
= 0
697 echo select * from t1
;
698 ---------------------------------------------------------
699 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
700 ---------------------------------------------------------
701 11 5 3333 44444 555555
702 12 5 1234 12345 123456
704 -2147483648 5 101 212 2147483647
705 101 12121 0 32123 78987
708 echo delete from t1 where f1
=-2147483648 or f3
=1234;
709 Statement Executed
: Rows Affected
= 3
710 echo select * from t1
;
711 ---------------------------------------------------------
712 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
713 ---------------------------------------------------------
714 11 5 3333 44444 555555
716 101 12121 0 32123 78987
718 echo delete from t1 where f1 between
25 and
6000000;
719 Statement Executed
: Rows Affected
= 1
720 echo select * from t1
;
721 ---------------------------------------------------------
722 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
723 ---------------------------------------------------------
724 11 5 3333 44444 555555
728 Statement Executed
: Rows Affected
= 2
729 echo select * from t1
;
730 ---------------------------------------------------------
731 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
732 ---------------------------------------------------------
736 echo "--Table having 5 fields f1,f2,f3,f4,f5(all int) index on t1(f1,f3,f2)--";
737 echo create table t1
(f1 int
,f2 int
,f3 int
,f4 int
,f5 int
);
739 echo create index idx1 on t1
(f1
,f3
,f2
);
741 echo insert into t1 values
(11,222,3333,44444,555555);
742 Statement Executed
: Rows Affected
= 1
743 echo insert into t1 values
(12,123,1234,12345,123456);
744 Statement Executed
: Rows Affected
= 1
745 echo insert into t1 values
(234,4567,56789,1234,4321);
746 Statement Executed
: Rows Affected
= 1
747 echo insert into t1 values
(-2147483648,1,101,212,2147483647);
748 Statement Executed
: Rows Affected
= 1
749 echo insert into t1 values
(101,12121,0,32123,78987);
750 Statement Executed
: Rows Affected
= 1
751 echo insert into t1 values
(12,123,1234,1111,1);
752 Statement Executed
: Rows Affected
= 1
753 echo select * from t1
;
754 ---------------------------------------------------------
755 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
756 ---------------------------------------------------------
757 11 222 3333 44444 555555
758 12 123 1234 12345 123456
759 234 4567 56789 1234 4321
760 -2147483648 1 101 212 2147483647
761 101 12121 0 32123 78987
764 echo select * from t1 where f1
>0 and f2
<=222 and f3
=3333 and f4
>44443 and f5
!=555550;
765 ---------------------------------------------------------
766 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
767 ---------------------------------------------------------
768 11 222 3333 44444 555555
770 echo select f1
,f3
,f5 from t1 where f1
=234 or f5
>4000 or f3
>=50000;
771 ---------------------------------------------------------
773 ---------------------------------------------------------
777 -2147483648 101 2147483647
780 echo select * from t1 where f1
<-1 and f2
>=1 or f3
=101;
781 ---------------------------------------------------------
782 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
783 ---------------------------------------------------------
784 -2147483648 1 101 212 2147483647
786 echo select * from t1 where f1
<-1 and f2
>=1 or f3
=1234;
787 ---------------------------------------------------------
788 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
789 ---------------------------------------------------------
790 12 123 1234 12345 123456
791 -2147483648 1 101 212 2147483647
794 echo select * from t1
;
795 ---------------------------------------------------------
796 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
797 ---------------------------------------------------------
798 11 222 3333 44444 555555
799 12 123 1234 12345 123456
800 234 4567 56789 1234 4321
801 -2147483648 1 101 212 2147483647
802 101 12121 0 32123 78987
805 echo update t1
set f1
=22 where f1
=11;
806 Statement Executed
: Rows Affected
= 1
807 echo select * from t1
;
808 ---------------------------------------------------------
809 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
810 ---------------------------------------------------------
811 22 222 3333 44444 555555
812 12 123 1234 12345 123456
813 234 4567 56789 1234 4321
814 -2147483648 1 101 212 2147483647
815 101 12121 0 32123 78987
818 echo update t1
set f1
=11 where f1
=22 and f2
=222;
819 Statement Executed
: Rows Affected
= 1
820 echo select * from t1
;
821 ---------------------------------------------------------
822 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
823 ---------------------------------------------------------
824 11 222 3333 44444 555555
825 12 123 1234 12345 123456
826 234 4567 56789 1234 4321
827 -2147483648 1 101 212 2147483647
828 101 12121 0 32123 78987
831 echo update t1
set f1
=10 where f1
in(234,10);
832 Statement Executed
: Rows Affected
= 1
833 echo select * from t1
;
834 ---------------------------------------------------------
835 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
836 ---------------------------------------------------------
837 11 222 3333 44444 555555
838 12 123 1234 12345 123456
839 10 4567 56789 1234 4321
840 -2147483648 1 101 212 2147483647
841 101 12121 0 32123 78987
844 echo update t1
set f2
=100 where f1
in(12,10);
845 Statement Executed
: Rows Affected
= 3
846 echo select * from t1
;
847 ---------------------------------------------------------
848 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
849 ---------------------------------------------------------
850 11 222 3333 44444 555555
851 12 100 1234 12345 123456
852 10 100 56789 1234 4321
853 -2147483648 1 101 212 2147483647
854 101 12121 0 32123 78987
857 echo update t1
set f2
=222 where f3
=56789 and f2
in(100,4567) and f4 between
100 and
20000;
858 Statement Executed
: Rows Affected
= 1
859 echo select * from t1
;
860 ---------------------------------------------------------
861 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
862 ---------------------------------------------------------
863 11 222 3333 44444 555555
864 12 100 1234 12345 123456
865 10 222 56789 1234 4321
866 -2147483648 1 101 212 2147483647
867 101 12121 0 32123 78987
870 echo update t1
set f2
=5 where f3
=56789 or f2
in(123,222) or f4 between
100 and
20000;
871 Statement Executed
: Rows Affected
= 5
872 echo select * from t1
;
873 ---------------------------------------------------------
874 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
875 ---------------------------------------------------------
876 11 5 3333 44444 555555
877 12 5 1234 12345 123456
879 -2147483648 5 101 212 2147483647
880 101 12121 0 32123 78987
883 echo update t1
set f2
=101,f2
=12121 where f3
=0;
884 Statement Executed
: Rows Affected
= 1
885 echo select * from t1
;
886 ---------------------------------------------------------
887 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
888 ---------------------------------------------------------
889 11 5 3333 44444 555555
890 12 5 1234 12345 123456
892 -2147483648 5 101 212 2147483647
893 101 12121 0 32123 78987
896 echo update t1
set f1
=2020202 where f1
in(-2147483647,2147483647) and f2
=1 and f3
=101;
897 Statement Executed
: Rows Affected
= 0
898 echo select * from t1
;
899 ---------------------------------------------------------
900 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
901 ---------------------------------------------------------
902 11 5 3333 44444 555555
903 12 5 1234 12345 123456
905 -2147483648 5 101 212 2147483647
906 101 12121 0 32123 78987
909 echo update t1
set f1
=2020202 where f1
in(-2147483647,2147483647) or f1
>=7777;
910 Statement Executed
: Rows Affected
= 0
911 echo select * from t1
;
912 ---------------------------------------------------------
913 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
914 ---------------------------------------------------------
915 11 5 3333 44444 555555
916 12 5 1234 12345 123456
918 -2147483648 5 101 212 2147483647
919 101 12121 0 32123 78987
922 echo update t1
set f1
=987654 where f1 between
25 and
200 and f3
>=4000;
923 Statement Executed
: Rows Affected
= 0
924 echo select * from t1
;
925 ---------------------------------------------------------
926 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
927 ---------------------------------------------------------
928 11 5 3333 44444 555555
929 12 5 1234 12345 123456
931 -2147483648 5 101 212 2147483647
932 101 12121 0 32123 78987
935 echo delete from t1 where f1
=-2147483648 or f3
=1234;
936 Statement Executed
: Rows Affected
= 3
937 echo select * from t1
;
938 ---------------------------------------------------------
939 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
940 ---------------------------------------------------------
941 11 5 3333 44444 555555
943 101 12121 0 32123 78987
945 echo delete from t1 where f1 between
25 and
6000000;
946 Statement Executed
: Rows Affected
= 1
947 echo select * from t1
;
948 ---------------------------------------------------------
949 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
950 ---------------------------------------------------------
951 11 5 3333 44444 555555
955 Statement Executed
: Rows Affected
= 2
956 echo select * from t1
;
957 ---------------------------------------------------------
958 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
959 ---------------------------------------------------------
963 echo "--Table having 5 fields f1,f2,f3,f4,f5(all int) index on t1(f5,f1,f3,f2)--";
964 echo create table t1
(f1 int
,f2 int
,f3 int
,f4 int
,f5 int
);
966 echo create index idx1 on t1
(f5
,f1
,f3
,f2
);
968 echo insert into t1 values
(11,222,3333,44444,555555);
969 Statement Executed
: Rows Affected
= 1
970 echo insert into t1 values
(12,123,1234,12345,123456);
971 Statement Executed
: Rows Affected
= 1
972 echo insert into t1 values
(234,4567,56789,1234,4321);
973 Statement Executed
: Rows Affected
= 1
974 echo insert into t1 values
(-2147483648,1,101,212,2147483647);
975 Statement Executed
: Rows Affected
= 1
976 echo insert into t1 values
(101,12121,0,32123,78987);
977 Statement Executed
: Rows Affected
= 1
978 echo insert into t1 values
(12,123,1234,1111,1);
979 Statement Executed
: Rows Affected
= 1
980 echo select * from t1
;
981 ---------------------------------------------------------
982 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
983 ---------------------------------------------------------
984 11 222 3333 44444 555555
985 12 123 1234 12345 123456
986 234 4567 56789 1234 4321
987 -2147483648 1 101 212 2147483647
988 101 12121 0 32123 78987
991 echo select * from t1 where f1
>0 and f2
<=222 and f3
=3333 and f4
>44443 and f5
!=555550;
992 ---------------------------------------------------------
993 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
994 ---------------------------------------------------------
995 11 222 3333 44444 555555
997 echo select f1
,f3
,f5 from t1 where f1
=234 or f5
>4000 or f3
>=50000;
998 ---------------------------------------------------------
1000 ---------------------------------------------------------
1004 -2147483648 101 2147483647
1007 echo select * from t1 where f1
<-1 and f2
>=1 or f3
=101;
1008 ---------------------------------------------------------
1009 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1010 ---------------------------------------------------------
1011 -2147483648 1 101 212 2147483647
1013 echo select * from t1 where f1
<-1 and f2
>=1 or f3
=1234;
1014 ---------------------------------------------------------
1015 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1016 ---------------------------------------------------------
1017 12 123 1234 12345 123456
1018 -2147483648 1 101 212 2147483647
1021 echo select * from t1
;
1022 ---------------------------------------------------------
1023 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1024 ---------------------------------------------------------
1025 11 222 3333 44444 555555
1026 12 123 1234 12345 123456
1027 234 4567 56789 1234 4321
1028 -2147483648 1 101 212 2147483647
1029 101 12121 0 32123 78987
1032 echo update t1
set f1
=22 where f1
=11;
1033 Statement Executed
: Rows Affected
= 1
1034 echo select * from t1
;
1035 ---------------------------------------------------------
1036 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1037 ---------------------------------------------------------
1038 22 222 3333 44444 555555
1039 12 123 1234 12345 123456
1040 234 4567 56789 1234 4321
1041 -2147483648 1 101 212 2147483647
1042 101 12121 0 32123 78987
1045 echo update t1
set f1
=11 where f1
=22 and f2
=222;
1046 Statement Executed
: Rows Affected
= 1
1047 echo select * from t1
;
1048 ---------------------------------------------------------
1049 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1050 ---------------------------------------------------------
1051 11 222 3333 44444 555555
1052 12 123 1234 12345 123456
1053 234 4567 56789 1234 4321
1054 -2147483648 1 101 212 2147483647
1055 101 12121 0 32123 78987
1058 echo update t1
set f1
=10 where f1
in(234,10);
1059 Statement Executed
: Rows Affected
= 1
1060 echo select * from t1
;
1061 ---------------------------------------------------------
1062 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1063 ---------------------------------------------------------
1064 11 222 3333 44444 555555
1065 12 123 1234 12345 123456
1066 10 4567 56789 1234 4321
1067 -2147483648 1 101 212 2147483647
1068 101 12121 0 32123 78987
1071 echo update t1
set f2
=100 where f1
in(12,10);
1072 Statement Executed
: Rows Affected
= 3
1073 echo select * from t1
;
1074 ---------------------------------------------------------
1075 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1076 ---------------------------------------------------------
1077 11 222 3333 44444 555555
1078 12 100 1234 12345 123456
1079 10 100 56789 1234 4321
1080 -2147483648 1 101 212 2147483647
1081 101 12121 0 32123 78987
1084 echo update t1
set f2
=222 where f3
=56789 and f2
in(100,4567) and f4 between
100 and
20000;
1085 Statement Executed
: Rows Affected
= 1
1086 echo select * from t1
;
1087 ---------------------------------------------------------
1088 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1089 ---------------------------------------------------------
1090 11 222 3333 44444 555555
1091 12 100 1234 12345 123456
1092 10 222 56789 1234 4321
1093 -2147483648 1 101 212 2147483647
1094 101 12121 0 32123 78987
1097 echo update t1
set f2
=5 where f3
=56789 or f2
in(123,222) or f4 between
100 and
20000;
1098 Statement Executed
: Rows Affected
= 5
1099 echo select * from t1
;
1100 ---------------------------------------------------------
1101 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1102 ---------------------------------------------------------
1103 11 5 3333 44444 555555
1104 12 5 1234 12345 123456
1105 10 5 56789 1234 4321
1106 -2147483648 5 101 212 2147483647
1107 101 12121 0 32123 78987
1110 echo update t1
set f1
=2020202 where f1
in(-2147483647,2147483647) and f2
=1 and f3
=101;
1111 Statement Executed
: Rows Affected
= 0
1112 echo select * from t1
;
1113 ---------------------------------------------------------
1114 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1115 ---------------------------------------------------------
1116 11 5 3333 44444 555555
1117 12 5 1234 12345 123456
1118 10 5 56789 1234 4321
1119 -2147483648 5 101 212 2147483647
1120 101 12121 0 32123 78987
1123 echo update t1
set f1
=2020202 where f1
in(-2147483647,2147483647) or f1
>=7777;
1124 Statement Executed
: Rows Affected
= 0
1125 echo select * from t1
;
1126 ---------------------------------------------------------
1127 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1128 ---------------------------------------------------------
1129 11 5 3333 44444 555555
1130 12 5 1234 12345 123456
1131 10 5 56789 1234 4321
1132 -2147483648 5 101 212 2147483647
1133 101 12121 0 32123 78987
1136 echo delete from t1 where f1
=-2147483648 or f3
=1234;
1137 Statement Executed
: Rows Affected
= 3
1138 echo select * from t1
;
1139 ---------------------------------------------------------
1140 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1141 ---------------------------------------------------------
1142 11 5 3333 44444 555555
1143 10 5 56789 1234 4321
1144 101 12121 0 32123 78987
1146 echo delete from t1 where f1 between
25 and
6000000;
1147 Statement Executed
: Rows Affected
= 1
1148 echo select * from t1
;
1149 ---------------------------------------------------------
1150 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1151 ---------------------------------------------------------
1152 11 5 3333 44444 555555
1153 10 5 56789 1234 4321
1155 echo delete from t1
;
1156 Statement Executed
: Rows Affected
= 2
1157 echo select * from t1
;
1158 ---------------------------------------------------------
1159 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5
1160 ---------------------------------------------------------
1165 Statement execute failed with error
-4