SHOW ENUMS

On this page Carat arrow pointing down
Warning:
GA releases for CockroachDB v23.1 are no longer supported. Cockroach Labs will stop providing LTS Assistance Support for v23.1 LTS releases on November 13, 2025. Prior to that date, upgrade to a more recent version to continue receiving support. For more details, refer to the Release Support Policy.

The SHOW ENUMS statement lists the enumerated data types in the current database.

Syntax

SHOW ENUMS FROM name . name

Parameters

Parameter Description
name
name.name
The name of the schema from which to show enumerated data types, or the name of the database and the schema, separated by a ".".

Examples

The following example creates a user-defined type.

icon/buttons/copy
> CREATE TYPE weekday AS ENUM ('monday', 'tuesday', 'wednesday', 'thursday', 'friday');
icon/buttons/copy
> CREATE TYPE weekend AS ENUM ('sunday', 'saturday');
icon/buttons/copy
> SHOW ENUMS;
  schema |  name   |                   values                   | owner
---------+---------+--------------------------------------------+--------
  public | weekday | {monday,tuesday,wednesday,thursday,friday} | demo
  public | weekend | {sunday,saturday}                          | demo
(2 rows)
icon/buttons/copy
> SHOW ENUMS FROM movr.public;
  schema |  name   |                   values                   | owner
---------+---------+--------------------------------------------+--------
  public | weekday | {monday,tuesday,wednesday,thursday,friday} | demo
  public | weekend | {sunday,saturday}                          | demo
(2 rows)

See also


Yes No
On this page

Yes No