title: Field value must be unique unless it is NULL
body: <p>I'm using SQL Server 2005.</p>
  
  <p>I have a field that must either contain a unique value or a NULL value. I think I should be enforcing this with either a <code>CHECK CONSTRAINT</code> or a <code>TRIGGER for INSERT, UPDATE</code>.</p>
  
  <p>Is there an advantage to using a constraint here over a trigger (or vice-versa)? What might such a constraint/trigger look like?</p>
  
  <p>Or is there another, more appropriate option that I haven't considered? </p>