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 / naveen

with this query two primary keys are created but in the insertion time it doesn'y work automatically.it says it can't insert null value in id1.

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

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a string in mysql?

958


How can we find out which auto increment was assigned on Last insert?

1138


How can you see all indexes defined for a table?

1155


How do I drop a database in mysql?

1169


Which storage engine is best in mysql?

1005


Does uninstalling mysql delete database?

1084


What is int mysql?

1006


What is the latest mysql?

1000


What is schema in mysql?

940


What is identity in mysql?

1031


Write a query to select all teams that won either 1, 3, 5 or 7 games.

1439


Is oracle better than mysql?

939


How do I kill a mysql query?

953


What is a simple query?

947


What is RMS Migrations

2444