Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. SQL Server
  3. Question
SQL Server

What is SQL Server’s unique index, per subset of data, based on values of another column?

Asked by Ankur Vaish Apr 24, 2021 1.6K views 1 answer
Share

About this question

Say I have a Customers table, and an Emails table. The emails table has these fields: Id CustomerId EmailValue Now, I want to create a constraint so that no duplicate emails should be registered per customer. Ways that I can think of are:

Your answer

1 Answer

More SQL Server discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.