Help Please!

From: "Arthur M(dot) Kang" <arthur(at)levelogic(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Help Please!
Date: 2000-01-12 22:18:08
Message-ID: 387CFDA0.920CFE7C@levelogic.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to create a table which has two keys, but on of the keys
auto-increments depending on the second key.

key1 | key2
------------
1 | NJ
2 | NJ
1 | CA
2 | CA
3 | CA
4 | CA

Now, with a single insert statement, I would like the next entry to be
(3,'NJ'); the 3 being the next incremented value corresponding with 'NJ.

Can anyone point me in the right direction or give me any clues?

I would be MOST appreciative. TIA.

Arthur

Browse pgsql-general by date

  From Date Subject
Next Message Julian Scarfe 2000-01-12 23:04:19 Making points into paths
Previous Message Arthur M. Kang 2000-01-12 22:07:55 Stumped. Somebody Help me please!