Re: Autoincremental value
| От | gnari |
|---|---|
| Тема | Re: Autoincremental value |
| Дата | |
| Msg-id | 001301c4817c$d65b6c20$0100000a@wp2000 обсуждение исходный текст |
| Ответ на | Autoincremental value (adburne@asocmedrosario.com.ar) |
| Список | pgsql-general |
"Josué Maldonado" <josue@lamundial.hn> wrote: > > El 13/08/2004 10:50 AM, adburne@asocmedrosario.com.ar en su mensaje > escribio: > > ... > > insert into table1 (field1) values (1); > > insert into table1 (field1) values (1); > > insert into table1 (field1) values (2); > > > > and then select * from table1, you get: > > field1| field2 > > ------+------- > > 1 | 1 > > 1 | 2 > > 2 | 1 > > ------+------- > > > > there is a way to do this with postgres??? > > Check the serial data type. I do not think this is possible with the serial data type in postgres. notice how the field2 is reset to 1 for each new value of field1 I did not know that this was possible in mysql. you would think that this is tricky to implement. gnari
В списке pgsql-general по дате отправления: