Re: view creation question

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Larry White <ljw1001(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: view creation question
Date: 2006-03-09 16:07:05
Message-ID: 20060309160705.GA70671@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 09, 2006 at 10:55:12AM -0500, Larry White wrote:
> I need a read only view that concatenates data from two tables. Basically
> both tables would need a simple query like
>
> Select name, description, date from Tasks;
>
> Select name, description, date from Issues;
>
> Is there some way to wrap these two independent queries in a "CREATE VIEW
> myview AS" statement?

Use UNION or UNION ALL.

http://www.postgresql.org/docs/8.1/interactive/queries-union.html

--
Michael Fuhr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message matroska 2006-03-09 16:07:24 Re: Tsearch2 cache lookup problem
Previous Message Richard Huxton 2006-03-09 16:02:52 Re: view creation question