# DROP STREAM

## Syntax <a href="#synopsis" id="synopsis"></a>

```sql
DROP STREAM stream_name;
```

## Description

Drops an existing [relation](/overview/core-concepts/databases.md#_relation). Only the stream owner can execute this command.

{% hint style="info" %}
**Notes**

* You cannot drop a stream if there exist any references to that stream or queries that depend on that stream.
* Deleting the stream does not delete the stream's underlying entity.
  {% endhint %}

{% hint style="warning" %}
**Important** `DROP STREAM` cannot be undone. Use it with care!
{% endhint %}

### Arguments

#### stream\_name

The name of the stream to drop. If the name is case-sensitive, you must wrap it in double quotes; otherwise, the system uses the lower case name.

## Example

#### Drop a stream using default database and schema

The following shows how to drop the stream named `pageviews`:

```sh
demodb.public/demostore# LIST STREAMS;
 Name        |  Type  |  Owner   |  State  |      Created at      |      Updated at       
-------------+--------+----------+---------+----------------------+-----------------------
  pageviews  | Stream | sysadmin | Created | 2024-06-06T22:57:54Z | 2024-06-06T22:57:56Z  
    
demodb.public/demostore# DROP STREAM pageviews;
demodb.public/demostore# LIST STREAMS;
  Name        |  Type  |  Owner   |  State  |      Created at      |      Updated at       
--------------+--------+----------+---------+----------------------+-----------------------
```

#### Drop a stream using a fully-qualified name

The following shows how to drop the stream named `pageviews` in the database `otherdb` and schema `s1`:

```sh
demodb.public/demostore# LIST STREAMS IN SCHEMA otherdb.s1;

     Name    |  Type  |  Owner   |  State  |      Created at      |      Updated at       
-------------+--------+----------+---------+----------------------+-----------------------
  pageviews  | Stream | sysadmin | Created | 2024-06-06T22:57:54Z | 2024-06-06T22:57:56Z  

demodb.public/demostore# DROP STREAM otherdb.s1.pageviews;
demodb.public/demostore# LIST STREAMS IN SCHEMA otherdb.s1;
  Name | Type | Owner | Created at | Updated at
-------+------+-------+------------+-------------
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.deltastream.io/reference/sql-syntax/ddl/drop-stream.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
