Updated on 2024-05-07 GMT+08:00

SHOW EVENTS

Description

Displays basic information about all scheduled tasks in a specified schema.

Precautions

Operations related to scheduled tasks are supported only when sql_compatibility is set to 'B'.

Syntax

SHOW EVENTS
    [{FROM | IN} schema_name]
    [LIKE 'pattern' | WHERE condition]

Parameters

  • {FROM | IN}

    Specifies the schema to be queried. By default, the current schema is queried.

  • LIKE

    Matches a scheduled task by name. If this parameter is not specified, all scheduled tasks in the current schema are printed.

  • WHERE

    Forms an expression for row selection to narrow down the query range of SHOW EVENTS. condition indicates any expression that returns a value of Boolean type. Rows that do not meet this condition will not be retrieved.

Example

-- View information about all scheduled tasks queried through pattern matching in the event_a schema.
gaussdb=#  SHOW EVENTS IN event_a LIKE '_e';