EXTERNAL is a reserved keyword used by several SQL dialects to declare and interact with data or code that lives outside the database engine. In Microsoft SQL Server PolyBase, Snowflake, Oracle, BigQuery and other platforms, EXTERNAL appears in DDL commands to create external tables, file formats, and data sources that map to cloud storage, HDFS, or on-prem files. These objects are read-only (or append-only, depending on the platform) and let you query external data with regular SQL.Because EXTERNAL is not a standalone statement but part of larger CREATE or ALTER commands, its behavior depends on the surrounding clause. Common patterns include:- CREATE EXTERNAL TABLE – defines a table whose data is stored in external files.- CREATE EXTERNAL DATA SOURCE – registers the location and access credentials of the remote storage system.- CREATE EXTERNAL FILE FORMAT – describes how to parse the external files (CSV, Parquet, JSON, etc.).Caveats:- External tables often do not support DML (INSERT, UPDATE, DELETE).- Performance is limited by the underlying storage throughput.- Permissions must allow the database engine to reach the external location.
CREATE EXTERNAL TABLE, CREATE EXTERNAL DATA SOURCE, CREATE EXTERNAL FILE FORMAT, FOREIGN TABLE, FDW, BULK INSERT
Oracle 9i external tables (2001); adopted by SQL Server 2016 PolyBase
EXTERNAL is a reserved SQL keyword used in CREATE statements to define objects that reference data or code stored outside the database engine, such as external tables and data sources.
In most implementations external tables are read-only. You can query them with SELECT but cannot run INSERT, UPDATE, or DELETE unless the database explicitly enables write support.
No. EXTERNAL is vendor-specific. Oracle, SQL Server, Snowflake, BigQuery, and other platforms adopted it independently, so syntax and capabilities differ.
Store data in columnar formats like Parquet, partition files by high-cardinality columns, and locate the external data in the same region as the compute engine to minimize latency.