Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, CREATE EXTERNAL TABLE is a SQL statement used to create tables that map to data stored outside of the database. This means that the data files are stored separately in a file system, such as Hadoop Distributed File System (HDFS) or Amazon S3.

The CREATE EXTERNAL TABLE statement defines the table structure including column names, data types, and partitioning information, but does not load any data into the table. Instead, the data remains in the external storage location, and the table simply acts as a pointer to the external data.

External tables are commonly used for big data scenarios where data is stored in distributed file systems, but there is still a need to query and analyze this data using SQL. By using external tables, data can be accessed without having to transfer or load it into the database, which can be time-consuming and resource-intensive.

To query data from an external table, you use standard SQL statements such as SELECT, INSERT, UPDATE, DELETE, and JOIN, just as you would with regular tables. The database engine will automatically retrieve and integrate the data from the external storage location as needed.

Overall, the CREATE EXTERNAL TABLE statement provides a powerful way to integrate and analyze data stored outside of a database, making it an essential tool for big data and analytics scenarios.