Last post Dec 24, 2014 12:22 PM by limno
Dec 22, 2014 04:17 AM|maheshvishnu|LINK
Why can't we create 2 primary keys for table?
Dec 22, 2014 04:21 AM|Ashim Chatterjee|LINK
It would be unwise since primary key is considered as a key
that identifies a single row in the table.So you can't have multiple primary keys , but you can have composite key.
Dec 22, 2014 04:22 AM|Lokesh B R|LINK
You can have Composite Primary Key like below
Create table CustomerProducts
CustomerID int references Customers(CustomerID) not null,
ProductID int references Products(ProductID) not null,
OrderLimit int not null,
Primary key (CustomerID, ProductID)
Dec 22, 2014 04:28 AM|Ravi kant jha|LINK
Two lion can not live in one forest.. so...
Dec 24, 2014 12:22 PM|limno|LINK
A table can have only ONE primary key( single column or multiple columns). You can create unique constraint on column other than primary key.