Re: how to do 'deep queries'?
От | Stewart Ben (RBAU/EQS4) * |
---|---|
Тема | Re: how to do 'deep queries'? |
Дата | |
Msg-id | E253BDD7F008244585AEE87AF8F0224F116C7A6A@cl-mail01.au.bosch.com обсуждение исходный текст |
Ответ на | how to do 'deep queries'? (jeff sacksteder <jsacksteder@gmail.com>) |
Список | pgsql-sql |
> Is there supported syntax to do 'deep' queries? That is where > A relates to B relates to C, returning fields from each table? > > This doesn't seem to work. Is there a google-able term for > this sort of query? > > select > foo.aaa, > bar.bbb, > baz.ccc > > from > foo,bar,baz > > where > foo.bar_id = bar.id > and > bar.baz_id = baz.id This works for me.. SELECT table1.state, table2.coursename, table3.firstname FROM backend.enrolments table1, backend.courses table2, backend.users table3WHERE table1.user = table3.employeeno AND table1.course = table2.courseid; What errors are you getting? Best regards, Ben Stewart -- Robert Bosch (Australia) Pty. Ltd. Engineering Quality Services, Student Software Engineer (RBAU/EQS4) Locked Bag 66 - Clayton South, VIC 3169 - AUSTRALIA Tel: +61 3 9541-7002 Fax: +61 3 9541-7700 mailto:ben.stewart@au.bosch.com http://www.bosch.com.au/
В списке pgsql-sql по дате отправления: