No. Is there a database that does?
Regards,
Thomas
This may not do what you think it does. A compound key is entirely
different from having two primary keys. What that line means is that
the combination of uid and uname must be unique--it actually breaks
your presumed intended uniqueness constraint, making it so that two
rows can have the same uid so long as they don't also have the same
uname (and vice-versa).
h2 supports compound keys the same as most other databases, and (as
best as I can tell) with the syntax you used. The error message you
received is not complaining about the compound key but about the fact
that you had already defined a primary key before--possibly by setting
a column to auto_increment? (Does that do it?)
--
Joshua Paine
Chief Tower Builder
LetterBlock Software
http://letterblock.com/
alter table mytable drop primary key;
alter table mytable add primary key (col1, col2);
Yes, I think this will solve the problem.
In most cases an auto-increment column is also the primary key. As far
as I know, this behavior is required for HSQLDB compatibility. But it
looks like in MySQL this is not the case. I will have a look if it is
possible to support both.
Regards,
Thomas