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

What are all the ddl commands?

1118


Why is theta join required?

1081


Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?

957


what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba

1006


What does (*) mean in sql?

904


Explain the difference between triggers and constraints?

921


What are the packages in pl sql?

968


How do I truncate a word?

1002


what is a database? : Sql dba

1101


How to get unique records from a table?

898


What is meant by truncate in sql?

1008


What is a primary key example?

903


What is the difference between stored procedure and view?

964


Can unique keys be null?

853


Can we create foreign key without primary key?

933