title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | dev_langs | monikerRange | |
---|---|---|---|---|---|---|---|---|---|---|
DROP EXTERNAL TABLE (Transact-SQL) |
DROP EXTERNAL TABLE (Transact-SQL) |
WilliamDAssafMSFT |
wiassaf |
11/02/2021 |
sql |
t-sql |
reference |
|
>=aps-pdw-2016||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current |
[!INCLUDE sqlserver2016-asdbmi-asa-pdw]
Removes a PolyBase external table from a database, but doesn't delete the external data.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
DROP EXTERNAL TABLE { database_name.schema_name.table_name | schema_name.table_name | table_name }
[;]
[ database_name . [schema_name] . | schema_name . ] table_name
The one- to three-part name of the external table to remove. The table name can optionally include the schema, or the database and schema.
Requires:
- ALTER permission on the schema to which the table belongs.
- ALTER ANY EXTERNAL DATA SOURCE
- ALTER ANY EXTERNAL FILE FORMAT
Dropping an external table removes all table-related metadata. It doesn't delete the external data.
DROP EXTERNAL TABLE SalesPerson;
DROP EXTERNAL TABLE dbo.SalesPerson;
DROP EXTERNAL TABLE EasternDivision.dbo.SalesPerson;
The following example removes the ProductVendor1
table, its data, indexes, and any dependent views from the current database.
DROP EXTERNAL TABLE ProductVendor1;
The following example drops the SalesPerson
table in the EasternDivision
database.
DROP EXTERNAL TABLE EasternDivision.dbo.SalesPerson;