<p>I'm creating a table that looks something like this.</p>

<pre><code>CREATE TABLE packages
(
  productCode char(2)
  , name nvarchar(100) 
  , ...
)
</code></pre>

<p>How do I make sure the productCode is always one of two values <code>XJ</code> or <code>XD</code>?</p>

```
```
ALTER TABLE packages
ADD CONSTRAINT constraintname CHECK (productCode in ('XJ', 'XD'))
```
```