> ## 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 PROCEDURE

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 PROCEDURE` <InternalLink path="sql-statements">statement</InternalLink> drops a <InternalLink path="stored-procedures">stored procedure</InternalLink>.

## Required privileges

To drop a procedure, the user must be the owner of the procedure.

## Synopsis

<img src="https://mintcdn.com/cockroachlabs/Nqtj0HvOrM_ugxgN/images/sql-diagrams/v26.2/drop_proc.svg?fit=max&auto=format&n=Nqtj0HvOrM_ugxgN&q=85&s=0f0cbdf6aba66fc548efddaf5d729a08" alt="drop_proc syntax diagram" style={{maxWidth: "100%", overflowX: "auto"}} width="677" height="299" data-path="images/sql-diagrams/v26.2/drop_proc.svg" />

## Parameters

| Parameter       | Description                                   |
| --------------- | --------------------------------------------- |
| `proc_name`     | The name of one of more procedures to drop.   |
| `routine_param` | An optional list of the procedure parameters. |

## Examples

### Drop a stored procedure

The following statement drops the <InternalLink path="stored-procedures">`delete_earliest_histories` example procedure</InternalLink>:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
DROP PROCEDURE delete_earliest_histories;
```

## See also

* <InternalLink path="stored-procedures">Stored Procedures</InternalLink>
* <InternalLink path="plpgsql">PL/pgSQL</InternalLink>
* <InternalLink path="create-procedure">`CREATE PROCEDURE`</InternalLink>
* <InternalLink path="call">`CALL`</InternalLink>
* <InternalLink path="alter-procedure">`ALTER PROCEDURE`</InternalLink>
