Displaying two tables side by side

Поиск
Список
Период
Сортировка
От David Garamond
Тема Displaying two tables side by side
Дата
Msg-id 411A2926.9020500@zara.6.isreserved.com
обсуждение исходный текст
Ответы Re: Displaying two tables side by side  (Andreas Haumer <andreas@xss.co.at>)
Re: Displaying two tables side by side  (Michael Kleiser <mkl@webde-ag.de>)
Re: Displaying two tables side by side  (Rod Taylor <pg@rbt.ca>)
Список pgsql-sql
How can you display two tables side by side? Example:
> select * from t1; a | b
---+--- 2 | 2 3 | 5 4 | 7 9 | 0
> select * from t2; c | d
---+--- 4 | 5 7 | 3 3 | 2 1 | 1 2 | 0

Intended output: a | b | c | d
---+---+---+--- 2 | 2 | 4 | 5 3 | 5 | 7 | 3 4 | 7 | 3 | 2 9 | 0 | 1 | 1   |   | 2 | 0

Each table has no keys (and no OIDs). Order is not important, but each 
row from each table needs to be displayed exactly once.

--
dave



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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Inserts with incomplete rows... NOT NULL constraints
Следующее
От: Rosser Schwarz
Дата:
Сообщение: Re: function expression in FROM may not refer to other relations of same query level