Re: joins?
От | David Eduardo Gomez Noguera |
---|---|
Тема | Re: joins? |
Дата | |
Msg-id | 20020306112928.1beed663.davidgn@servidor.unam.mx обсуждение исходный текст |
Ответ на | joins? (David Eduardo Gomez Noguera <davidgn@servidor.unam.mx>) |
Список | pgsql-general |
On Wed, 6 Mar 2002 11:57:57 -0500 "Gregory Wood" <gregw@com-stock.com> wrote: i do joins on a foreign key. i.e. from (table1 left join table2 on table1.id=table2.fk_table1_id) left join table3 on table1.id=table2.fk_table1_id... do you know if postgres takes any advantage of that? or if there is an easier way to write it? (i.e. tell it to join on foreign keys constraints) > Explicit joins allow you to order the joins any way you want. When join > conditions are in the WHERE clause, you don't have any control over the > order in which the tables are joined. > > Additionally, when you do an explicit join, you can perform other types of > joins, such as an inner join, outer join, etc. > > Personally I prefer doing explicit joins because it makes my SQL more > readable to me; all the glue that joins the tables together is in the FROM, > and the WHERE clause just limits the rows that I want returned. > > Greg > > ----- Original Message ----- > From: "David Eduardo Gomez Noguera" <davidgn@servidor.unam.mx> > To: "postgres" <pgsql-general@postgresql.org> > Sent: Wednesday, March 06, 2002 10:40 AM > Subject: [GENERAL] joins? > > > > Hello. > > I am a bit new to databases. just still learning. > > I havent got it right, but wht is the difference between a joint and a > where clause? > > specially "join on ". > > > > -- > > ICQ: 15605359 Bicho > > =^..^= > > First, they ignore you. Then they laugh at you. Then they fight you. Then > you win. Mahatma Gandhi. > > -------------------------------気検体の一 > 致------------------------------------ > > 暑さ寒さも彼岸まで。 > > 恋にししょうなし。恋はしあんの他。 > > アン アン アン とっても大好き > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 5: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/users-lounge/docs/faq.html > > -- ICQ: 15605359 Bicho =^..^= First, they ignore you. Then they laugh at you. Then they fight you. Then you win. Mahatma Gandhi. -------------------------------気検体の一致------------------------------------ 暑さ寒さも彼岸まで。 恋にししょうなし。恋はしあんの他。 アン アン アン とっても大好き
В списке pgsql-general по дате отправления: