| title | DROP QUEUE (Transact-SQL) | Microsoft Docs | |||||
|---|---|---|---|---|---|---|
| ms.custom | ||||||
| ms.date | 03/06/2017 | |||||
| ms.prod | sql-non-specified | |||||
| ms.reviewer | ||||||
| ms.suite | ||||||
| ms.technology |
|
|||||
| ms.tgt_pltfrm | ||||||
| ms.topic | language-reference | |||||
| f1_keywords |
|
|||||
| dev_langs |
|
|||||
| helpviewer_keywords |
|
|||||
| ms.assetid | fd866520-ca00-477d-b2e9-0110e9610ed4 | |||||
| caps.latest.revision | 33 | |||||
| author | JennieHubbard | |||||
| ms.author | jhubbard | |||||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]
Drops an existing queue.
Transact-SQL Syntax Conventions
DROP QUEUE <object>
[ ; ]
<object> ::=
{
[ database_name . [ schema_name ] . | schema_name . ]
queue_name
}
database_name
The name of the database that contains the queue to drop. When no database_name is provided, defaults to the current database.
schema_name (object)
The name of the schema that owns the queue to drop. When no schema_name is provided, defaults to the default schema for the current user.
queue_name
The name of the queue to drop.
You cannot drop a queue if any services refer to the queue.
Permission for dropping a queue defaults to the owner of the queue, members of the db_ddladmin or db_owner fixed database roles, and members of the sysadmin fixed server role.
The following example drops the ExpenseQueue queue from the current database.
DROP QUEUE ExpenseQueue ;
CREATE QUEUE (Transact-SQL)
ALTER QUEUE (Transact-SQL)
EVENTDATA (Transact-SQL)