title: Trying to create a check constraint on email with Regular Expression in SQL
body: <p>I'm trying to add a constraint to check if the email match the following criteria:</p>
  
  <p>An email address consists of alphanumeric characters, followed by an @ symbol, followed by alphanumeric characters, followed by a . symbol, followed by alphanumeric characters.</p>
  
  <p>This is what I have and it's not working:</p>
  
  <pre><code>IF email  NOT REGEXP '^[A-Za-z0-9._%\-+!#$&amp;/=?^|~]+@[A-Za-z0-9.-]+[.][A-Za-z]+$' 
  </code></pre>
  
  <p>Can someone advise what I should do?</p>