Logo 
Search:

SQL FAQ

Submit Interview FAQ
Home » Interview FAQ » SQLRSS Feeds

What will happen if a unique index is created on a nonunique field?

  Shared By: Shruti Sharma    Date: Dec 21    Category: SQL    Views: 1121

Answer:

Depending on which database you are using, you will receive some type of error and no index at all will be created. The constituent fields of a unique index must form a unique value.

Share: 
 



Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: