1 echo create table t1
(f1 int
,f2 int
);
3 echo create table t2
(f1 int
,f2 int
);
5 echo insert into t1 values
(101,100);
6 Statement Executed
: Rows Affected
= 1
7 echo insert into t1 values
(303,333);
8 Statement Executed
: Rows Affected
= 1
9 echo insert into t1 values
(505,555);
10 Statement Executed
: Rows Affected
= 1
11 echo insert into t2 values
(505,100);
12 Statement Executed
: Rows Affected
= 1
13 echo insert into t2 values
(100,101);
14 Statement Executed
: Rows Affected
= 1
15 echo insert into t2 values
(404,444);
16 Statement Executed
: Rows Affected
= 1
17 echo insert into t2 values
(303,300);
18 Statement Executed
: Rows Affected
= 1
19 echo insert into t2 values
(101,110);
20 Statement Executed
: Rows Affected
= 1
25 echo select * from t1
,t2 where t1.f1
= t2.f1 and t1.f1
= t2.f1
;
26 ---------------------------------------------------------
27 t1.f1 t1.f2 t2.f1 t2.f2
28 ---------------------------------------------------------
33 echo select * from t1
,t2 where t1.f1
= t2.f1 and t2.f2
> 100;
34 ---------------------------------------------------------
35 t1.f1 t1.f2 t2.f1 t2.f2
36 ---------------------------------------------------------
40 echo select * from t1
,t2 where t1.f1
= t2.f1 or t1.f2
> t2.f2
;
41 ---------------------------------------------------------
42 t1.f1 t1.f2 t2.f1 t2.f2
43 ---------------------------------------------------------
55 echo select * from t1
,t2 where t1.f1
= t2.f1 or t2.f2
> 100;
56 ---------------------------------------------------------
57 t1.f1 t1.f2 t2.f1 t2.f2
58 ---------------------------------------------------------
73 echo select * from t1
,t2 where not
( t1.f1
= t2.f1 and t1.f1
= t2.f1
);
74 ---------------------------------------------------------
75 t1.f1 t1.f2 t2.f1 t2.f2
76 ---------------------------------------------------------
90 echo select * from t1
,t2 where
( not t1.f1
= t2.f1
);
91 ---------------------------------------------------------
92 t1.f1 t1.f2 t2.f1 t2.f2
93 ---------------------------------------------------------
107 echo select * from t1
,t2 where t1.f1
= t2.f1 and t1.f2
= 100;
108 ---------------------------------------------------------
109 t1.f1 t1.f2 t2.f1 t2.f2
110 ---------------------------------------------------------
113 echo select * from t1
,t2 where t1.f1
> t2.f1 and t2.f2
= 110;
114 ---------------------------------------------------------
115 t1.f1 t1.f2 t2.f1 t2.f2
116 ---------------------------------------------------------
120 echo select * from t1
,t2 where t1.f1
> t2.f1 and t2.f2
> 100;
121 ---------------------------------------------------------
122 t1.f1 t1.f2 t2.f1 t2.f2
123 ---------------------------------------------------------