HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Creating a DOMAIN in MySQL or MariaDB?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
creatingmysqldomainmariadb

Problem

As far as I know, DOMAINS cannot be created in MySQL. Is there any disadvantage for that? Is there something to be used instead of using CREATE DOMAIN?

Solution

No, check constraints are supported by MariaDB. Domains are user defined datatypes. The domain mechanism allows you to put constraints on the datatype instead of having to put constraints on every single column where the specific datatype is being used.

Context

StackExchange Database Administrators Q#121471, answer score: 2

Revisions (0)

No revisions yet.