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
21 echo select * from t1
,t2 where t1.f1
= t2.f1 and t1.f1
= t2.f1
;
22 ---------------------------------------------------------
23 t1.f1 t1.f2 t2.f1 t2.f2
24 ---------------------------------------------------------
29 echo select * from t1
,t2 where t1.f1
= t2.f1 and t2.f2
> 100;
30 ---------------------------------------------------------
31 t1.f1 t1.f2 t2.f1 t2.f2
32 ---------------------------------------------------------
36 echo select * from t1
,t2 where t1.f1
= t2.f1 or t1.f2
> t2.f2
;
37 ---------------------------------------------------------
38 t1.f1 t1.f2 t2.f1 t2.f2
39 ---------------------------------------------------------
51 echo select * from t1
,t2 where t1.f1
= t2.f1 or t2.f2
> 100;
52 ---------------------------------------------------------
53 t1.f1 t1.f2 t2.f1 t2.f2
54 ---------------------------------------------------------
69 echo select * from t1
,t2 where not
( t1.f1
= t2.f1 and t1.f1
= t2.f1
);
70 ---------------------------------------------------------
71 t1.f1 t1.f2 t2.f1 t2.f2
72 ---------------------------------------------------------
86 echo select * from t1
,t2 where
( not t1.f1
= t2.f1
);
87 ---------------------------------------------------------
88 t1.f1 t1.f2 t2.f1 t2.f2
89 ---------------------------------------------------------
103 echo select * from t1
,t2 where t1.f1
= t2.f1 and t1.f2
= 100;
104 ---------------------------------------------------------
105 t1.f1 t1.f2 t2.f1 t2.f2
106 ---------------------------------------------------------
109 echo select * from t1
,t2 where t1.f1
> t2.f1 and t2.f2
= 110;
110 ---------------------------------------------------------
111 t1.f1 t1.f2 t2.f1 t2.f2
112 ---------------------------------------------------------
116 echo select * from t1
,t2 where t1.f1
> t2.f1 and t2.f2
> 100;
117 ---------------------------------------------------------
118 t1.f1 t1.f2 t2.f1 t2.f2
119 ---------------------------------------------------------