On Fri, 7 Jun 2002, Matt wrote:
> I have a table, OrderDetail, with two primary keys OrderID and ProductID
I assume you mean it has a primary key with two columns.
>
> I want another table, Claims, to reference the primary keys of
> OrderDetail so that the pair has to match between table not just one
> attrib. I can't figure out how to do this from the docs I have. can
> anyone help? thankyou in advance
If I understand what you want, use the table constraint form of foreign
keys:
create table a (a int, b int, primary key(a,b));
create table b (a int, b int, foreign key(a,b) references a);