A single table can't have two primary keys.it can only forgein keys.but u can use any number of foregin key in a single table. Its impossible to create two primary key in a single table
but if we use composite key we have do it just like that
CREATE TABLE Test (id1 INT NOT NULL, id2 INT NOT NULL, name
CHAR(20) NOT NULL, PRIMARY KEY(id1,id2));
|