CREATE FOREIGN TABLE SQL Statement | Teradata Database - CREATE FOREIGN TABLE - Teradata Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Database
Release Number
20.00
Published
June 2025
ft:locale
en-US
ft:lastEdition
2026-09-23
dita:mapPath
mbm1747160743883.ditamap
dita:ditavalPath
jlp1749501702948.ditaval
dita:id
mdr1472255012272
lifecycle
latest

Foreign tables enable Teradata Database to access data in external object store, such as semi-structured and unstructured data in Amazon S3, Azure Blob storage, and Google Cloud Storage. In-database integration of this data allows data scientists and analysts to read and process this data using standard SQL. You can join external data to relational data in Teradata Database, and process it using built-in Teradata Cloud analytics and functions.

The external data can be in various standard data formats, such as JSON, CSV, and Parquet.

Creating a foreign table requires specifying the location of the data. You must also specify the credentials, except if you are using AWS IAM.

CREATE FOREIGN TABLE creates a foreign table with a PARTITION BY clause even if you do not specify one. The PARTITION BY clause determines the table's virtual columns. HELP TABLE output identifies virtual columns.

ANSI Compliance

This statement is a Teradata extension to the ANSI SQL:2011 standard.

Required Privileges

You must have the CREATE TABLE privilege on the database or user in which the table is created.

Privileges Granted Automatically

The creator receives the following privileges WITH GRANT OPTION on the newly created table:
  • DROP TABLE
  • SELECT
For more information about database privileges, see SQL Data Control Language, B035-1149.