Re: insert into / select from / serial problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: insert into / select from / serial problem
Дата
Msg-id 5013.1124065991@sss.pgh.pa.us
обсуждение исходный текст
Ответ на insert into / select from / serial problem  ("tgh002" <arnulfh@gmail.com>)
Список pgsql-sql
"tgh002" <arnulfh@gmail.com> writes:
> I am using a insert statement like:
> INSERT INTO newtable
> SELECT field1, field2 FROM anothertable

> newtable structure is: serial, varchar, varchar

> What syntax do I use to insert the serial field?

I think you want to just let it default, which you'd do with, say,

INSERT INTO newtable (fielda, fieldb)
SELECT field1, field2 FROM anothertable
        regards, tom lane


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

Предыдущее
От: Luca Rasconi Master
Дата:
Сообщение: Re: sum but not grouped by?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: trigger between to different database