ENUM data type consists of a set of enumerated, static values.
Syntax
To declare a new enumerated data type, useCREATE TYPE:
<name is the name of the new type, and <value1, <value2>, ... are string literals that make up the type’s set of static values.
You can qualify the <name of an enumerated type with a database and schema name (e.g., db.typename). After the type is created, it can only be referenced from the database that contains the type.
To show all ENUM types in the database, including all ENUMS created implicitly for multi-region databases, use SHOW ENUMS:
ENUM type, use ALTER TYPE:
<value is a string literal to add to the existing list of type values. You can also use ALTER TYPE to rename types, rename type values, set a type’s schema, or change the type owner’s role specification.
To drop the type, use DROP TYPE:
Required privileges
- To create a type in a database, a user must have the
CREATEprivilege on the database. - To drop a type, a user must be the owner of the type.
- To alter a type, a user must be the owner of the type.
- To grant privileges on a type, a user must have the
GRANTprivilege and the privilege that they want to grant. - To create an object that depends on a type, a user must have the
USAGEprivilege on the type.
Example
Supported casting and conversion
ENUM data type values can be cast to STRINGs.
Values can be cast explicitly or implicitly. For example, the following SELECT statements are equivalent:
Comparing enumerated types
To compare two enumerated types, you must explicitly cast both types asSTRINGs. For example:

