1 echo create table t1
(f1 int
,f2 int
);
3 echo create table t2
(f1 int
,f2 int
);
5 echo create table t3
(f1 int
,f2 int
);
7 echo insert into t1 values
(101,100);
8 Statement Executed
: Rows Affected
= 1
9 echo insert into t1 values
(303,333);
10 Statement Executed
: Rows Affected
= 1
11 echo insert into t1 values
(505,555);
12 Statement Executed
: Rows Affected
= 1
13 echo insert into t2 values
(505,100);
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
(101,110);
18 Statement Executed
: Rows Affected
= 1
19 echo insert into t3 values
(303,333);
20 Statement Executed
: Rows Affected
= 1
21 echo insert into t3 values
(101,110);
22 Statement Executed
: Rows Affected
= 1
23 echo insert into t3 values
(222,200);
24 Statement Executed
: Rows Affected
= 1
25 echo select * from t1
,t2
,t3 where t1.f1
= t2.f1 and t3.f1
=100;
26 ---------------------------------------------------------
27 t1.f1 t1.f2 t2.f1 t2.f2 t3.f1 t3.f2
28 ---------------------------------------------------------
29 100 100 100 110 100 200
30 505 555 505 100 100 200
32 echo select * from t2
,t1
,t3 where t1.f1
= t2.f1 and t3.f1
=100;
33 ---------------------------------------------------------
34 t2.f1 t2.f2 t1.f1 t1.f2 t3.f1 t3.f2
35 ---------------------------------------------------------
36 505 100 505 555 100 200
37 100 110 100 100 100 200
39 echo select * from t3
,t1
,t2 where t1.f1
= t2.f1 and t3.f1
=100;
40 ---------------------------------------------------------
41 t3.f1 t3.f2 t1.f1 t1.f2 t2.f1 t2.f2
42 ---------------------------------------------------------
43 100 200 100 100 100 110
44 100 200 505 555 505 100