Please help me to create domain in MySQL. I have tried to run the followoing statement in MySQL but got syntax error:
create domain age as int(2);
Domains are data type definitions that resolve to a primitive data type or another domain. In relational database terminology, a domain defines the permitted range of values for an attribute of an entity.
The SQL-92 standard supports a variety of built-in domain types: char(n) (or character(n)): fixed-length character string, with user-specified length. varchar(n) (or character varying): variable-length character string, with user-specified maximum length. int or integer: an integer (length is machine-dependent).
MySQL doesn't support user-defined domains, so it is not possible to run a CREATE DOMAIN
statement.
Your syntax is not ok. I don't think that CREATE DOMAIN is supported by MySQL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With