Can a table have more than one Primary Key ?
Pavan Ramamurthy
Select an image from your device to upload
Commonly asked question in an interview ?
No,You cannot have two primary keys in one table.But primary can contain multiple fields.When you create table,when you mention primary key you can more then one column which you want.like,CREATE TABLE table_name ( col1 Datatype , col2 Datatype,col3 Datatype, col4 Datatype, PRIMARY KEY (col1,col2,col3) )
No. Because Primary key is an identity to the row. There cannot be two identities against a row.