Re: new table with a select

Поиск
Список
Период
Сортировка
От Florian Weimer
Тема Re: new table with a select
Дата
Msg-id 821uw993en.fsf@mid.bfk.de
обсуждение исходный текст
Ответ на Re: new table with a select  (Julien Cigar <jcigar@ulb.ac.be>)
Список pgsql-sql
* Julien Cigar:

> create table foo as select * from bar;
>
> just add "where 1=2" if you just want the schema

There's also this:
 CREATE TABLE foo (LIKE bar);

This gives you more control over what aspects of the table are
duplicated; see the documentation for details.

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


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

Предыдущее
От: Julien Cigar
Дата:
Сообщение: Re: new table with a select
Следующее
От: gvim
Дата:
Сообщение: Add one column to another