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
23 echo select * from t1
,t2 where t1.f1
= t2.f1 and t1.f1
= t2.f1
;
24 ---------------------------------------------------------
25 t1.f1 t1.f2 t2.f1 t2.f2
26 ---------------------------------------------------------
31 echo select * from t1
,t2 where t1.f1
= t2.f1 and t2.f2
> 100;
32 ---------------------------------------------------------
33 t1.f1 t1.f2 t2.f1 t2.f2
34 ---------------------------------------------------------
38 echo select * from t1
,t2 where t1.f1
= t2.f1 or t1.f2
> t2.f2
;
39 ---------------------------------------------------------
40 t1.f1 t1.f2 t2.f1 t2.f2
41 ---------------------------------------------------------
53 echo select * from t1
,t2 where t1.f1
= t2.f1 or t2.f2
> 100;
54 ---------------------------------------------------------
55 t1.f1 t1.f2 t2.f1 t2.f2
56 ---------------------------------------------------------
71 echo select * from t1
,t2 where not
( t1.f1
= t2.f1 and t1.f1
= t2.f1
);
72 ---------------------------------------------------------
73 t1.f1 t1.f2 t2.f1 t2.f2
74 ---------------------------------------------------------
88 echo select * from t1
,t2 where
( not t1.f1
= t2.f1
);
89 ---------------------------------------------------------
90 t1.f1 t1.f2 t2.f1 t2.f2
91 ---------------------------------------------------------
105 echo select * from t1
,t2 where t1.f1
= t2.f1 and t1.f2
= 100;
106 ---------------------------------------------------------
107 t1.f1 t1.f2 t2.f1 t2.f2
108 ---------------------------------------------------------
111 echo select * from t1
,t2 where t1.f1
> t2.f1 and t2.f2
= 110;
112 ---------------------------------------------------------
113 t1.f1 t1.f2 t2.f1 t2.f2
114 ---------------------------------------------------------
118 echo select * from t1
,t2 where t1.f1
> t2.f1 and t2.f2
> 100;
119 ---------------------------------------------------------
120 t1.f1 t1.f2 t2.f1 t2.f2
121 ---------------------------------------------------------