| From: | Holger Klawitter <lists(at)klawitter(dot)de> |
|---|---|
| To: | o(dot)blomqvist(at)secomintl(dot)com (Otto Blomqvist), pgsql-general(at)postgresql(dot)org |
| Subject: | Re: making two tables with identical schemas appear as one |
| Date: | 2004-08-20 07:06:44 |
| Message-ID: | 200408200906.48681.lists@klawitter.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
> I have a couple of tables with the same schema that I would like to
> query and view as one table. I looked into CREATE VIEW and FULL JOINs
> but still can't figure out a good (fast) way of doing this..
It depends on the specific way you want to bring the tables together.
Without more specific information nobody will be able to help.
Somehow I suspect you are looking for UNION:
CREATE VIEW
bothTables
AS SELECT
x, y, z
FROM tableA
UNION SELECT
x, y, z
FROM tableB
;
Mit freundlichem Gruß / With kind regards
Holger Klawitter
- --
lists <at> klawitter <dot> de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQFBJaMI1Xdt0HKSwgYRAkjQAJ95RawVA5ufaIaY1bITFHAvYsZWwACcCA0c
QKqsbAC1an/JIl/4Ok5mqLU=
=045v
-----END PGP SIGNATURE-----
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Martini | 2004-08-20 07:43:08 | Re: libpq: passwords WAS: scripting & psql issues |
| Previous Message | Ulrich Wisser | 2004-08-20 07:02:13 | insert waiting |