Re: Newbie wonder...
От | PFC |
---|---|
Тема | Re: Newbie wonder... |
Дата | |
Msg-id | opsnmd1uimth1vuj@localhost обсуждение исходный текст |
Ответ на | Newbie wonder... (Bernard Grosperrin <bernard@bgsoftfactory.com>) |
Ответы |
Re: Newbie wonder...
|
Список | pgsql-sql |
If you want to add a SERIAL field to an existing table, create a sequence and then create an integer field with default nextval(seq) and postgres will fill it automatically. The order in which it will fill it is not guaranteed though ! However, you might also like to de-dupe your data once it's in the additional tables, thus you might need more complicated measures. > (2) How should I go to create a sequence for an existing table? For all > futures data entry, after this conversion, I want the unique ID for each > row to come from a sequence, but if I know how to create a table using > serial, I am not sure how to modify one for this. > > Thanks, > Bernard > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org >
В списке pgsql-sql по дате отправления: