> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cockroachlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DROP TRIGGER

The `DROP TRIGGER` [statement](/docs/stable/sql-statements.md) drops a [trigger](/docs/stable/triggers.md).

## Required privileges

To drop a trigger, the user must be the owner of the table on which the trigger is defined.

## Synopsis

![drop\_trigger syntax diagram](https://mintcdn.com/cockroachlabs/UZNSFbmU2EwEm6G5/images/sql-diagrams/common/drop_trigger.svg?fit=max\&auto=format\&n=UZNSFbmU2EwEm6G5\&q=85\&s=f1d717053c1f9802f379c9414894669f)

## Parameters

| Parameter | Description |
| - | - |
| `trigger_name` | The name of the trigger to drop. |
| `table_name` | The name of the table associated with the trigger. |

## Examples

#### Setup

To follow along, run [`cockroach demo`](/docs/stable/cockroach-demo) to start a temporary, in-memory cluster with the [`movr`](/docs/stable/movr) sample dataset preloaded:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
$ cockroach demo
```

### Drop a trigger

Create a sample trigger function:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
CREATE FUNCTION update_timestamp()
RETURNS TRIGGER AS $$
BEGIN
  RAISE NOTICE 'Current timestamp: %', now();
  RETURN NEW;
END;
$$ LANGUAGE PLpgSQL;
```

Create a sample trigger:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
CREATE TRIGGER log_update_timestamp
AFTER UPDATE ON users
FOR EACH ROW
EXECUTE FUNCTION update_timestamp();
```

Drop the trigger:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
DROP TRIGGER log_update_timestamp ON users;
```

## See also

* [Triggers](/docs/stable/triggers.md)
* [`CREATE TRIGGER`](/docs/stable/create-trigger)
* [`ALTER TRIGGER`](/docs/stable/alter-trigger)
* [`SHOW TRIGGERS`](/docs/stable/show-triggers)
* [`SHOW CREATE`](/docs/stable/show-create)
* [`CREATE FUNCTION`](/docs/stable/create-function)
