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

How to run a sql statement?

1036


How to enable or disable a row of a table using MySQL in struts?

4102


Will mysql remain free?

961


Why do we use pragma autonomous transaction?

915


How can you retrieve a particular number of records from a table?

937


What is the use of mysql_close()?

977


What is difference between pdo and mysqli?

992


What is mysql gpl?

859


How do I quit mysql?

934


What are Heap tables?

1564


How to enter binary numbers in sql statements?

973


How to use 'mysql' to run sql statements?

1095


Why use mysql procedures?

986


How to use sum function in where clause in mysql?

964


How is mysql database stored?

1071