Creating Table Copy

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Creating Table Copy
Дата
Msg-id alpine.LNX.2.11.1406161342100.28452@localhost
обсуждение исходный текст
Ответы Re: Creating Table Copy [RESOLVED]
Re: Creating Table Copy
Список pgsql-general
   I have a table with some NULL values in a date column. I need to make a
copy of that table containing only those rows where the date column is not
null. Reading the CREATE TABLE man page I've tried to create a copy of the
original table from which I could drop rows. While the table creating is
successful, it contains no rows. I do not see an option to include the data
as well as the schema.

   The syntax I thought would work is,

# create table benthos (like benthosraw including all);

but it creates an empty table.

   Please pass me a clue on copying the data as well as the schema.

   While I suspect there's a way to write a SELECT statement for those rows
that are not null and save the results to a different table name, I've not
found the syntax in my postgres and SQL references.

TIA,

Rich



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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: (Relatively) Oversized Checkpoint
Следующее
От: Rich Shepard
Дата:
Сообщение: Re: Creating Table Copy [RESOLVED]