Search Postgresql Archives

Re: Select from tableA - if not exists then tableB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/08/2017 02:56 PM, Patrick B wrote:
Hi guys,

I have two tables that supports the same data, but different table DDL
(We are migrating all the data from one to another).

What I need is basically:

1. Query looks for the data on table A,
2. if it doesn't find it on table A, go look for it on table B

Now, how could I do that in a Select? Can you please provide some examples?

If you can provide some information:

1) The table schema

2) How the data is related between the two tables.



I'm using PostgreSQL 9.1.

Thanks
Patrick


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux