• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

SQl plus question about multiple primary keys in same table

piski

Senior member
I have an associative entity table (therefore there are 2 primary keys). In SQLplus, how do i create a table with multpile primary keys?

CREATE TABLE tablename(
primary_one number(10) PRIMARY KEY
,primary_two number(10) PRIMARY KEY
);

???????

Please help, thanks
 
You don't. Each table can have only one primary key.
You can, however make the entire tuple the primary key, or make one UNIQUE. The syntax for either escapes me at the moment..
 
one primary key using both of those fields

you separate out the primary key definition...goes something like...

constraint PRIMARY KEY (primary_one,primary_two)
 
Back
Top