| От | Bruno Wolff III |
|---|---|
| Тема | Re: CREATE TABLE AS ... |
| Дата | |
| Msg-id | 20020723154436.GA24446@wolff.to обсуждение |
| Ответ на | CREATE TABLE AS ... (Raphael Bauduin <raphael@be.easynet.net>) |
| Список | pgsql-admin |
On Tue, Jul 23, 2002 at 15:48:07 +0200, Raphael Bauduin <raphael@be.easynet.net> wrote: > Hi, > > In a data model change, I wanted to use the "create table as select" > feature. However, I want that table to have a primary key defined, and > thus a field defined as NOT NULL. I didn't find a way to add a NOT NULL > constraint on a column of an existing table. If there isn't, what's the > best way to go? A COPY? Another option is to use create table and insert select. The create can then set up the table exactly like you need. And then you can copy over data using insert selecting from the source table.
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера