SELECT from multiple tables (not join though) - Mailing list pgsql-general

From Madison Kelly
Subject SELECT from multiple tables (not join though)
Date
Msg-id 41E2B9E1.6020506@alteeve.com
Whole thread Raw
Responses Re: SELECT from multiple tables (not join though)  (Madison Kelly <linux@alteeve.com>)
Re: SELECT from multiple tables (not join though)  (John Sidney-Woollett <johnsw@wardbrook.com>)
Re: SELECT from multiple tables (not join though)  (Janning Vygen <vygen@gmx.de>)
Re: SELECT from multiple tables (not join though)  ("Frank D. Engel, Jr." <fde101@fjrhome.net>)
Re: SELECT from multiple tables (not join though)  (Alex Turner <armtuk@gmail.com>)
Re: SELECT from multiple tables (not join though)  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
Hi all,

   I have another question, I hope it isn't too basic. ^.^

   I want to do a select from multiple tables but not join them. What I
am trying to do is something like this (though this doesn't work as I need):

SELECT a.file_name, b.file_name, c.file_name FROM file_info_1 a,
file_info_2 b, file_info_3 c WHERE a.file_name='/' AND
b.file_parent_dir='/' AND c.file_parent_dir='/';

   That returns every combination of the results from the three tables
which is a huge number. What I need is to return all of the matches in
all of the tables in a single column. Once I have all the matches in one
column the next trick is to sort the combined results (any tips there?).

   I hope the question was clear. Please let me know if it wasn't. Thanks!

Madison

pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Function for retreiving datatype
Next
From: Madison Kelly
Date:
Subject: Re: SELECT from multiple tables (not join though)