Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8BJ37737905 for ; Tue, 11 Sep 2001 15:03:07 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f8BIl5W80318 for pgsql-sql@postgresql.org; Tue, 11 Sep 2001 14:47:05 -0400 (EDT) (envelope-from news) From: trebischt@freemail.hu (trebischt) X-Newsgroups: comp.databases.postgresql.sql Subject: To query many tables. Date: 11 Sep 2001 11:47:03 -0700 Organization: http://groups.google.com/ Lines: 25 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-sql@postgresql.org X-Archive-Number: 200109/82 X-Sequence-Number: 4730 Hi, I have to query many tables (about 18 tables) from a database to field a riport in HTML. I can make the query and it works (I think), but it's a bit strange to me. The query looks like this: select * from table1 f, table2 s, table3 t, table4 fo, table5 fi, table6 si, table 7 se, table8 e, table9 n, table10 ten, table 11 el, table 12 tw ... where f.id=s.id and f.id=t.id and f.id=fo.id and f.id=fi.id and so on... Is this the right way, or are there any better solution? How do the professionals make that big queries? Thanks in advance! Regards, Trebb