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...

how we can use more then one primary key in Single Table

Answer Posted / mukesh

Its impossible to create two primary key in a single table
but if we use composite key we have do it just like that

CREATE TABLE Test (id1 INT NOT NULL, id2 INT NOT NULL, name
CHAR(20) NOT NULL, PRIMARY KEY(id1,id2));

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Set a root password if there is on root password.

1145


What is the difference between a database and a table?

1055


How many rows can be inserted in mysql at a time?

1064


What is difference between unix timestamp and mysql timestamp?

1064


What is 'mysqld'?

1009


How is myisam table stored?

1009


Is mysql an oracle product?

898


What is a data directory?

1005


How do I free up space in mysql?

967


What is regex in mysql?

1151


Is mysql still relevant?

964


Can not connect to mysql server 10060?

996


What is localhost in mysql?

1062


Why do we use views instead of tables?

961


What is a string in mysql?

964