title: Create Unique Constraint based on Start Date and End Date
body: <p>I created a unique constraint as below which is working fine. But I want to create a constraint where the productNumber between the two dates should be unique</p>
  
  <pre><code>  ALTER TABLE [dbo].[Product]  ADD CONSTRAINT  U_Product UNIQUE ([ProductNumber],[StartDate],[EndDate])
  </code></pre>
  
  <p>Right now, it is taking the exact value in columns, but I want it between two dates. How can I do this ?</p>
  
  <p><img src="https://i.stack.imgur.com/GT62G.png" alt="table"></p>