how to declare unique key in creating a table..?

Answers were Sorted based on User's Feedback



how to declare unique key in creating a table..?..

Answer / chandu

create table sales(prodid INT NOT NULL UNIQUE
QUANTITY INT);

Is This Answer Correct ?    6 Yes 2 No

how to declare unique key in creating a table..?..

Answer / pankaj

When we declare a primary key its a unique key. for that table.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More MySQL Interview Questions

The table tbl_sites contains the following data: ----------------------------------------------------- Userid sitename country ------------------------------------------------------ 1 sureshbabu indian 2 PHPprogrammer andhra 3 PHP.net usa 4 PHPtalk.com germany 5 MySQL.com usa 6 sureshbabu canada 7 PHPbuddy.com pakistan 8. PHPtalk.com austria 9. PHPfreaks.com sourthafrica 10. PHPsupport.net russia 11. sureshbabu australia 12. sureshbabu nepal 13. PHPtalk.com italy Write a select query that will displayed the duplicated site name and how many times it is duplicated?

4 Answers   Afixi, GE,


What are the disadvantages of mysql?

0 Answers  


How do I view data in mysql workbench?

0 Answers  


How many types of indexes are there in mysql?

0 Answers  


What is full form of xampp?

0 Answers  






What is the use of indexing table?

2 Answers  


How can I remotely connect to mysql database?

0 Answers  


What is mysql procedure?

0 Answers  


What are the common mysql functions?

0 Answers  


Why mongodb is faster than mysql?

0 Answers  


how to find max salary from the database

3 Answers  


How many tables will create when we create table, what are they?

2 Answers  


Categories