What is the difference between TYPE and DOMAIN in SQL

Viewed 2102

i was wondering what is the difference between CREATE TYPE and CREATE DOMAIN in SQL?? Anyone can help me on this subject?

1 Answers

With CREATE DOMAIN you can create a subtype that is based on one existing type (adding constraints to it).

With CREATE TYPE you can create composite types or enum or others that they are structurally different to existing types.

Related