2 echo Description
:BETWEEN and IN
test;
4 Statement Executed
: Rows Affected
= 1
5 Statement Executed
: Rows Affected
= 1
6 Statement Executed
: Rows Affected
= 1
7 Statement Executed
: Rows Affected
= 1
8 Statement Executed
: Rows Affected
= 1
9 Statement Executed
: Rows Affected
= 1
10 echo select * from t1 where f1 between
12 and
14;
11 ---------------------------------------------------------
13 ---------------------------------------------------------
18 echo select * from t1 where f1 not between
12 and
14;
19 ---------------------------------------------------------
21 ---------------------------------------------------------
26 echo select * from t1 where f3 between
12 and
14;
27 ---------------------------------------------------------
29 ---------------------------------------------------------
34 echo select * from t1 where f1 IN
(12, 14, 50);
35 ---------------------------------------------------------
37 ---------------------------------------------------------
42 echo select * from t1 where f1 IN
(12, 14, 50) AND f3 IN
(50);
43 ---------------------------------------------------------
45 ---------------------------------------------------------
50 echo select * from t1 where f1 IN
(12, 14, 50) OR f3 IN
(50);
51 ---------------------------------------------------------
53 ---------------------------------------------------------
58 echo select * from t1 where f1 IN
(12, 14, 50) AND f3 between
12 and
14;
59 ---------------------------------------------------------
61 ---------------------------------------------------------
65 echo select * from t1 where f1 NOT IN
(12, 14, 50);
66 ---------------------------------------------------------
68 ---------------------------------------------------------