![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have two tables joined by foreign key id_przelewu, and for some rows results of queries with NATURAL JOIN and JOIN ... USING (...) differs ! I've readed that NATURAL JOIN is only shorthand for the second method, but this results shows that's not true: |
|
select id_przelewu,id_zamowienia from zamowienia natural join przelew where id_klienta=4999; id_przelewu | id_zamowienia -------------+--------------- (0 rows) select id_przelewu,id_zamowienia from zamowienia join przelew using (id_p rzelewu) where id_klienta=4999; id_przelewu | id_zamowienia -------------+--------------- 3095 | 7504 3095 | 7503 3095 | 7408 (3 rows) |
#3
| |||
| |||
|
|
I have two tables joined by foreign key id_przelewu, and for some rows results of queries with NATURAL JOIN and JOIN ... USING (...) differs ! I've readed that NATURAL JOIN is only shorthand for the second method, but this results shows that's not true: |
#4
| |||
| |||
|
|
I have two tables joined by foreign key id_przelewu, and for some rows results of queries with NATURAL JOIN and JOIN ... USING (...) differs ! I've readed that NATURAL JOIN is only shorthand for the second method, but this results shows that's not true: [...] select id_przelewu,id_zamowienia from zamowienia natural join przelew where id_klienta=4999; id_przelewu | id_zamowienia -------------+--------------- (0 rows) |
![]() |
| Thread Tools | |
| Display Modes | |
| |