Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can a table have two primary keys?

Answer Posted / dan

Kumar Navdeep Shanker

I have created the table provided and it works well.
You said that is possible to have two primary key, I am
sorry I have to disagree with you and all who said yes.

Let me explain using your table

cno balance cname
1 2 w
2 2 x
1 3 r
primary key no two tuple have the same value

what you are providing is a composite key

Thus, we can have more than one key in a table that the
compinaition of the keys are unique

BUT we have only one primary key that means it is unique

Please correct me if i am wrong

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is sql used in oracle?

1037


What is primary key and unique key?

1167


Is sql a microsoft product?

997


What is rowtype?

1079


What is the least restrictive isolation level? : Transact sql

1105


What is pessimistic concurrency control? : Transact sql

1135


What is a constraint? Tell me about its various levels.

1247


What is difference between stored procedures and application procedures?

1066


how can we destroy the session, how can we unset the variable of a session? : Sql dba

1051


What is procedure function?

1124


What are the advantages of normalization?

1129


Is mariadb a nosql database?

1098


How do you rename a table in sql?

1186


Can there be 2 primary keys in a table?

1043


Can you join a table to itself?

1222