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

# DROP PROCEDURE

export const InlineImage = ({src, alt = "", height = "1.6em"}) => {
  return <img noZoom src={src} alt={alt} style={{
    display: "inline",
    verticalAlign: "start",
    height: height,
    margin: "0"
  }} />;
};

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>;
};

<InlineImage alt="Megaphone" src="/images/common/icon-megaphone.png" /> New in v23.2: The `DROP PROCEDURE` <InternalLink path="sql-statements">statement</InternalLink> drops a <InternalLink path="stored-procedures">stored procedure</InternalLink>.

## Required privileges

To drop a procedure, a user must have the `DROP` <InternalLink path="security-reference/authorization#managing-privileges">privilege</InternalLink> on the procedure.

## Synopsis

<img src="https://mintcdn.com/cockroachlabs/Bc-7BE4092mn9J_1/images/sql-diagrams/v23.2/drop_proc.svg?fit=max&auto=format&n=Bc-7BE4092mn9J_1&q=85&s=9e9c4dc9d5a3158609d167be838d9ecb" alt="drop_proc syntax diagram" style={{maxWidth: "100%", overflowX: "auto"}} width="677" height="299" data-path="images/sql-diagrams/v23.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>
