Check out example codes for "create domain sql". It will help you in understanding the concepts better.

Code Example 1

CREATE DOMAIN ime_domene tip_domene
[DEFAULT literal |NULL |USER]
[NOT NULL] [CHECK (pogoji)];

Learn ReactJs, React Native from akashmittal.com