\copy combine with SELECT

Поиск
Список
Период
Сортировка
От jia ding
Тема \copy combine with SELECT
Дата
Msg-id 91ae6e350603140526v527c8424ibe25e87c9964e7d2@mail.gmail.com
обсуждение исходный текст
Ответы Re: \copy combine with SELECT  (Chris <dmagick@gmail.com>)
Список pgsql-general
Hi all,

I tried:
select id, name  into table2   from table1;
 \copy table2 to filename.txt
in order to export 2 columns from table1 to a file.

But, I am thinking, if there is a command can combine these two command together?
Maybe, something like: \copy select id,name  from table  to filename.txt

?

Nina

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

Предыдущее
От: sconeek@gmail.com
Дата:
Сообщение: catch SELECT statement return
Следующее
От: sconeek@gmail.com
Дата:
Сообщение: Hour records within a date range