New answers tagged

0 votes

Is a Composite UNIQUE Constraint On an Already UNIQUE Column Redundant?

Are you asking about satisfying a query like this? select col1, col2, col3 from person where customer_id = 785 If customer_id is the leading component in two indexes, the query optimizer will have a ...
la_mochila's user avatar
0 votes

Is a Composite UNIQUE Constraint On an Already UNIQUE Column Redundant?

Assuming your example is valid,above constraint is not redundant. customer_id is unique on its own way. But as per business requirement customerid+name should also be unique. Say as per biz req. ...
KumarHarsh's user avatar
  • 1,603

Top 50 recent answers are included