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 do I view data in mysql workbench?

482


Is mysqli secure?

467


How does mysql store binary data?

490


What is full form of xampp?

516


What is the difference between is null & is not null?

496






How to convert numeric values to character strings?

504


What is mysql procedure?

495


how to display nth highest salary from a table in a mysql query? : Mysql dba

556


How to get a version of mysql?

510


Write a command with which mysql table can be repaired

519


Write a query to display current date and time?

495


Is mysql free software?

477


How do you kill a long running query in mysql?

450


How do I install the latest mysql on ubuntu?

472


Is pdo faster than mysqli?

451