1 echo create table t1
(f1 int
,f2 int
);
3 echo insert into t1 values
(1,10);
4 Statement Executed
: Rows Affected
= 1
5 echo insert into t1 values
(2,NULL
);
6 Statement Executed
: Rows Affected
= 1
7 echo insert into t1 values
(3,30);
8 Statement Executed
: Rows Affected
= 1
9 echo insert into t1 values
(5,50);
10 Statement Executed
: Rows Affected
= 1
11 echo create table t2
(f1 int
,f2 int
);
13 echo insert into t2 values
(1,NULL
);
14 Statement Executed
: Rows Affected
= 1
15 echo insert into t2 values
(2,20);
16 Statement Executed
: Rows Affected
= 1
17 echo insert into t2 values
(3,30);
18 Statement Executed
: Rows Affected
= 1
19 echo insert into t2 values
(4,40);
20 Statement Executed
: Rows Affected
= 1
21 echo select * from t1
;
22 ---------------------------------------------------------
24 ---------------------------------------------------------
30 echo select * from t2
;
31 ---------------------------------------------------------
33 ---------------------------------------------------------
39 echo select * from t1
,t2
;
40 ---------------------------------------------------------
41 t1.f1 t1.f2 t2.f1 t2.f2
42 ---------------------------------------------------------
60 echo select * from t1
,t2 where t1.f1
=t2.f1 and t1.f2
=t2.f2
;
61 ---------------------------------------------------------
62 t1.f1 t1.f2 t2.f1 t2.f2
63 ---------------------------------------------------------
66 echo select * from t1
,t2 where t1.f2
=t2.f2 and t1.f1
=t2.f1
;
67 ---------------------------------------------------------
68 t1.f1 t1.f2 t2.f1 t2.f2
69 ---------------------------------------------------------
72 echo select * from t1
,t2 where t1.f1
>t2.f1 and t1.f2
>t2.f2
;
73 ---------------------------------------------------------
74 t1.f1 t1.f2 t2.f1 t2.f2
75 ---------------------------------------------------------
81 echo select * from t1
,t2 where t1.f2
<t2.f2 and t1.f1
<=t2.f1
;
82 ---------------------------------------------------------
83 t1.f1 t1.f2 t2.f1 t2.f2
84 ---------------------------------------------------------
90 echo select * from t1
,t2 where t1.f1
=t2.f1 or t1.f2
=t2.f2
;
91 ---------------------------------------------------------
92 t1.f1 t1.f2 t2.f1 t2.f2
93 ---------------------------------------------------------
98 echo select * from t1
,t2 where t1.f2
=t2.f2 or t1.f1
=t2.f1
;
99 ---------------------------------------------------------
100 t1.f1 t1.f2 t2.f1 t2.f2
101 ---------------------------------------------------------
106 echo select * from t1
,t2 where t1.f1
>t2.f1 or t1.f2
>=t2.f2
;
107 ---------------------------------------------------------
108 t1.f1 t1.f2 t2.f1 t2.f2
109 ---------------------------------------------------------
119 echo select * from t1
,t2 where t1.f2
<t2.f2 or t1.f1
<t2.f1
;
120 ---------------------------------------------------------
121 t1.f1 t1.f2 t2.f1 t2.f2
122 ---------------------------------------------------------
130 echo select * from t1
,t2 where t1.f1
>t2.f1 or t1.f2
>t2.f2
;
131 ---------------------------------------------------------
132 t1.f1 t1.f2 t2.f1 t2.f2
133 ---------------------------------------------------------
142 echo select * from t1
,t2 where t1.f1
=t2.f1 and not
(t1.f2
=t2.f2
);
143 ---------------------------------------------------------
144 t1.f1 t1.f2 t2.f1 t2.f2
145 ---------------------------------------------------------
147 echo select * from t1
,t2 where t1.f2
=t2.f2 and not
(t1.f1
=t2.f1
);
148 ---------------------------------------------------------
149 t1.f1 t1.f2 t2.f1 t2.f2
150 ---------------------------------------------------------
152 echo select * from t1
,t2 where not
(t1.f1
>t2.f1
) and t1.f2
>t2.f2
;
153 ---------------------------------------------------------
154 t1.f1 t1.f2 t2.f1 t2.f2
155 ---------------------------------------------------------
157 echo select * from t1
,t2 where not
(t1.f2
<t2.f2
) and not
(t1.f1
<t2.f1
);
158 ---------------------------------------------------------
159 t1.f1 t1.f2 t2.f1 t2.f2
160 ---------------------------------------------------------
167 echo select * from t1
,t2 where not
(t1.f1
=t2.f1
) or not
(t1.f2
=t2.f2
);
168 ---------------------------------------------------------
169 t1.f1 t1.f2 t2.f1 t2.f2
170 ---------------------------------------------------------