drop table

Removes a table definition and all of its data, indexes, partition properties, triggers, encryption properties, and permissions from the database.

Syntax

drop table [[database.]owner.]table_name 
	[, [[database.]owner.]table_name] ...

Parameters

Examples

Usage

See also sp_depends, sp_help, sp_spaceused in Reference Manual: Procedures.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

The permission checks for drop table differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must be the table owner or a user with drop any table privilege.

Disabled

With granular permissions disabled, you must be the table owner or a user with sa_role.

Auditing

Values in event and extrainfo columns of sysaudits are:

InformationValues
Event

27

Audit option

drop

Command or access audited

drop table

Information in extrainfo
  • Roles – current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – NULL

  • Proxy information – original login name, if set proxy is in effect

Related reference
alter table
create table
delete
truncate table