Autoincremental value

Поиск
Список
Период
Сортировка
От adburne@asocmedrosario.com.ar
Тема Autoincremental value
Дата
Msg-id 14610181509.20040813135048@asocmedrosario.com.ar
обсуждение исходный текст
Ответы Re: Autoincremental value  (Josué Maldonado <josue@lamundial.hn>)
Re: Autoincremental value  (Bruno Wolff III <bruno@wolff.to>)
Re: Autoincremental value  (Mage <mage@mage.hu>)
Re: Autoincremental value  (Ben <bench@silentmedia.com>)
Re: Autoincremental value  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-general
Hi I'm a newbie in postgresql, I came from MSSQL, MySQL and now
I'm testing postgres.
In mysql there is a way to make a second autoincrement field, just:

create table table1
(field1 integer,
field2 integer autoincrement,
primary key (field1,field2))

when insert rows:

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???

thnx!!!!

--
Saludos,
 adburne
 mailto:adburne@asocmedrosario.com.ar


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

Предыдущее
От: Shelby Cain
Дата:
Сообщение: Postgresql 8.0 beta 1 service issue
Следующее
От: Shelby Cain
Дата:
Сообщение: Re: Postgresql 8.0 beta 1 service issue