ALTER DOMAIN
Synopsis
Use the ALTER DOMAIN
statement to change the definition of an existing domain.
Syntax
alter_domain_default ::= ALTER DOMAIN name
{ SET DEFAULT expression | DROP DEFAULT }
alter_domain_rename ::= ALTER DOMAIN name RENAME TO name
alter_domain_default
alter_domain_rename
Semantics
SET DEFAULT | DROP DEFAULT
Set or remove the default value for a domain.
RENAME
Change the name of the domain.
name
Specify the name of the domain. An error is raised if DOMAIN name
does not exist or DOMAIN new_name
already exists.
Examples
yugabyte=# CREATE DOMAIN idx DEFAULT 5 CHECK (VALUE > 0);
yugabyte=# ALTER DOMAIN idx DROP DEFAULT;
yugabyte=# ALTER DOMAIN idx RENAME TO idx_new;
yugabyte=# DROP DOMAIN idx_new;
See also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .