DROP EXTERNAL FILE FORMAT

DROP EXTERNAL FILE FORMAT#

Removes a user-defined external file format from the current virtual database.

Syntax#

DROP EXTERNAL FILE FORMAT format name

Arguments#

format_name

The name of the format to remove.

Remarks#

IF EXISTS is not supported, as it is not in SQL Server. Dropping a format that does not exist raises error 15151; the built-in formats (csv, tsv, parquet) are not objects of the database, so naming one raises the same error.

A job or procedure whose CREATE EXTERNAL TABLE ... AS SELECT names the dropped format fails at its next run.

The statement is refused in the system databases (master, msdb), which hold no formats.

Permissions#

Requires ALTER ANY EXTERNAL FILE FORMAT in the current database, which ALTER and CONTROL on the database imply.

Examples#

DROP EXTERNAL FILE FORMAT excel_csv;

See also#