title: SQL (Custom) Unique Constraint for a set of rows
body: <p>How to create a ( may be custom) unique constraint for a particular no.of rows.</p>
  <p>I have table data as below</p>
  <p><a href="https://i.stack.imgur.com/tVrsM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tVrsM.png" alt="enter image description here" /></a></p>
  <p>I want my <strong>itemFK</strong> column to be Unique for same <strong>productionsessionKey</strong> value. i.e for all yellow (101) <strong>itemFK</strong> should be <strong>Unique</strong> and for all blue (102) <strong>itemFK</strong> should be <strong>unique</strong>. Else they can be duplicate.</p>