|
|
|
Проблема outer join по 3 таблицам
|
|||
|---|---|---|---|
|
#18+
Как обойти запрет описываемый в SQL Ref. p. 5-26 8i т.е. Нельзя сделать outer join через 3 таблицы типа: (Здесь я хочу получить полностью Т1 и соединененную через Т3 Т2?) select t1.a,t3.a,t2.a from t1,t3,t2 where t1.id=t3.t1(+) and t2.id=t3.t2 где DDL( не изменяема) create table t1 (id number(3) constraint t1_id pRIMARY KEY, A varchar2(2)); create table t2 (id number(3) constraint t2_id pRIMARY KEY, A varchar2(2)); CREATE TABLE T3 (id number(3) constraint t3_id pRIMARY KEY, T1 number(3), T2 number(3), A varchar2(2), constraint fk_t1 FOREIGN KEY (t1) , constraint fk_t2 FOREIGN KEY (t2)); В принципе можно subquery сделать, но может есть элегантное решение? (Хотя может я непрвильно что-то понял?) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.06.2003, 12:16:53 |
|
||
|
Проблема outer join по 3 таблицам
|
|||
|---|---|---|---|
|
#18+
А если так: select t1.a,t3.a,t2.a from t1,t3,t2 where t1.id=t3.t1(+) and t3.t2=t2.id(+) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.06.2003, 12:22:23 |
|
||
|
|

start [/forum/topic.php?fid=52&fpage=2766&tid=1990082]: |
0ms |
get settings: |
7ms |
get forum list: |
9ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
63ms |
get topic data: |
6ms |
get forum data: |
2ms |
get page messages: |
21ms |
get tp. blocked users: |
1ms |
| others: | 225ms |
| total: | 338ms |

| 0 / 0 |
