title: how to create user defined Type in Sql
body: <p>i don't know how to create a domain with optional constrains?
  i tried </p>
  
  <pre><code>CREATE DOMAIN idx INT CHECK (VALUE &gt; 100 AND VALUE &lt; 999);
  </code></pre>
  
  <p>but faced the below err
  Unknown object type 'DOMAIN' used in a CREATE, DROP, or ALTER statement.</p>