[GENERAL] Select from tableA - if not exists then tableB

Поиск
Список
Период
Сортировка
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?


I'm using PostgreSQL 9.1.

Thanks
Patrick

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] data transformation and replication
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] Select from tableA - if not exists then tableB