Stumped. Somebody Help me please!

From: "Arthur M(dot) Kang" <arthur(at)levelogic(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Stumped. Somebody Help me please!
Date: 2000-01-12 22:07:55
Message-ID: 387CFB3A.E5E1C7A9@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');
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 Arthur M. Kang 2000-01-12 22:18:08 Help Please!
Previous Message Bruce Momjian 2000-01-12 21:00:40 Re: [GENERAL] Simulating an outer join