List:General Discussion« Previous MessageNext Message »
From:Matthew Walker Date:July 12 2002 9:30pm
Subject:Autoincrement in MultiColumn primary key?
View as plain text  
filter: sql,query

I did some tests recently on a two column primary key, one of which was
an autoincrement column. It worked nicely, maintaining a separate
increment for every unique value in the second column. I was ecstatic,
as this was exactly what I need for some tables I'm designing.

However, today I tried to use the same idea in a three column primary
key, and it seems to be acting like a lone autoincrement column, instead
of how it acted with two columns.

What I want to know, is this: Is the two-column behavior an official
feature, or is it an unintended effect? I personally /love/ that
behavior, and think it should be a feature, but before I go further, I
need to know if I can count on it to hang around. And if it is a
feature, why it doesn't work in three column indexes.

Please CC the reply-to address in your responses.

Thanks for your time,
Matthew Walker

Autoincrement in MultiColumn primary key?Matthew Walker12 Jul
  • RE: Autoincrement in MultiColumn primary key?Wouter van Vliet13 Jul