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

How do I enable mysqli extension?

0 Answers  


Explain data type TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP .

2 Answers   Zensar,


How do you know if your mysql server is alive?

0 Answers  


What is the usage of regular expressions in mysql?

0 Answers  


How do I grant privileges to a user in mysql phpmyadmin?

0 Answers  


What?s the difference between PRIMARY KEY and UNIQUE in MyISAM?

4 Answers   Aufait, CSS, Wipro,


What is deterministic in mysql?

0 Answers  


What is mysql server used for?

0 Answers  


Explain GRANT command in MySQL.

1 Answers  


Explain the different types of mysql joins.

0 Answers  


How to allow the user "sonia" to connect to the server from localhost using the password "passwd". Login as root. Switch to the mysql db. Give privs. Update privs.

0 Answers  


Can I use mysql for free?

0 Answers  


Categories