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

# DROP TRIGGER

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

The `DROP TRIGGER` <InternalLink path="sql-statements">statement</InternalLink> drops a <InternalLink path="triggers">trigger</InternalLink>.

## Required privileges

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

## Synopsis

<img src="https://mintcdn.com/cockroachlabs/uBcLAizjWFXF4pfd/images/sql-diagrams/v25.1/drop_trigger.svg?fit=max&auto=format&n=uBcLAizjWFXF4pfd&q=85&s=a0fe5c9ab8a483bc48f41dd913cdbe38" alt="drop_trigger syntax diagram" style={{maxWidth: "100%", overflowX: "auto"}} width="697" height="155" data-path="images/sql-diagrams/v25.1/drop_trigger.svg" />

## 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 <InternalLink path="cockroach-demo">`cockroach demo`</InternalLink> to start a temporary, in-memory cluster with the <InternalLink path="movr">`movr`</InternalLink> 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;
```

## Known limitations

<InternalLink path="drop-trigger">`DROP TRIGGER`</InternalLink> with `CASCADE` is not supported.

## See also

* <InternalLink path="triggers">Triggers</InternalLink>
* <InternalLink path="create-trigger">`CREATE TRIGGER`</InternalLink>
* <InternalLink path="create-function">`CREATE FUNCTION`</InternalLink>
