Re: stupid SQL question, how reach different rows of two almost same tables

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: stupid SQL question, how reach different rows of two almost same tables
Дата
Msg-id c2d9e70e0510041451o6217f9d0n7f436dd1303f55eb@mail.gmail.com
обсуждение исходный текст
Ответ на stupid SQL question, how reach different rows of two almost same tables  (" Jaromír Kamler" <kamler@centrum.cz>)
Список pgsql-novice
On 10/4/05, Jaromír Kamler <kamler@centrum.cz> wrote:
> I am sorry, I know that this is an SQL problem ... . I need reach different
> rows in 2 almost same tables. I need use it in PL/pgSQL. Thanks for your
> advidce.
>
>

this works?...

create temp table t1 as
select * from (select * from foo1 intersect select * from foo2) as tmp_foo;

select * from (select * from foo1 except select * from t1) as tmp_foo1
union
select * from (select * from foo2 except select * from t1) as tmp_foo2;


--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

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

Предыдущее
От: David Gaudine
Дата:
Сообщение: Sorting by the maximum value of two columns
Следующее
От: "Alvaro Cobo"
Дата:
Сообщение: Moving from MySQL