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 do I create an index in word?

1035


What is db journal file?

1070


How do I find duplicates in a single column in sql?

1022


What is the most common sql injection tool?

1044


What does seeding a database mean?

972


What is bind reference and how can it be created?

1021


How do I copy a table in sql?

993


What is online transaction processing (oltp)?

1018


Why use stored procedures?

1098


What is sql stand for?

991


What is the difference between sql and mysql?

1123


What is recursive join in sql?

1031


Can we rename a column in the output of sql query?

995


How do you write an index?

971


Can a procedure in a package be overloaded?

1045