Bug #1075 SQL DOMAIN support
Submitted: 18 Aug 2003 7:08 Modified: 31 May 2021 11:48
Reporter: Clint Sheffield Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:4.0.14 OS:Any
Assigned to: CPU Architecture:Any

[18 Aug 2003 7:08] Clint Sheffield
Description:
Please can support for SQL DOMAINs be added so that the following can be done:

CREATE DOMAIN d_username AS VARCHAR(25);

CREATE TABLE users (
  user_name d_username  NOT NULL,
  pwd       VARCHAR(15) NOT NULL
);

CREATE TABLE visits (
  date      DATETIME    NOT NULL,
  user_name d_username  NOT NULL
);

How to repeat:
N/A

Suggested fix:
N/A
[27 Aug 2003 12:51] Peter Zaitsev
Dear Clint,

Thank you for your feedback. We have similar feature, "Distinct Datatypes", which
is to replace SQL DOMAIN in  SQL:2003 standard in our ToDo list.

The support for it shall come somewhere in MySQL 5.x
[31 May 2021 11:48] MySQL Verification Team
"Distinct Datatypes" is not supported MySQL 5.x, 8.x.

So this SR should be re-open as FR.

For more details about "CREATE DOMAIN" see this document.

https://crate.io/docs/sql-99/en/latest/chapters/19.html

or PostgreSQL Document.

https://www.postgresql.org/docs/current/sql-createdomain.html