What is the difference between a unique index and a non-unique index?

  • A non-unique index allows duplicate values in the indexed column(s)
  • A non-unique index does not allow NULL values in the indexed column(s)
  • A unique index allows NULL values in the indexed column(s)
  • A unique index allows only unique values in the indexed column(s)
A unique index enforces uniqueness, ensuring that each indexed value is unique, while a non-unique index allows duplicate values to be stored. Understanding this difference is crucial for data integrity and query optimization.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *