title: Constraint Check for 10 Digit Character use for Postal Code
body: <p>I have a table with a <code>Char(10)</code> column type, named <code>postal Code</code> and I need a Constraint check for all values just be 10 digits like <code>1234567890</code> and nothing else, I use the following:</p>
  
  <pre><code>CONSTRAINT [CH_PCDigit] CHECK ( [PostalCode] LIKE '%[^0-9]%'),
  CONSTRAINT [CH_PCLength] CHECK ( LEN([PostalCode])=10)
  </code></pre>
  
  <p>but not worked correctly, why? and what is your suggestion? is there any way to merge this 2 constraint with one?</p>
  
  <p>And what about if I want a Postal Code like this: <code>12345-54321</code> mean: 5digit-5digit? (Also Type must be <code>Char(11)</code>).</p>
  
  <p>Does any one know any good source for Rgex or Constraint Check in SQl?</p>