Copying Table Definitions | CREATE TABLE ... AS | Teradata Vantage - Copying Table Definitions - Teradata Vantage - Analytics Database

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-22
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jbg1472252759029
lifecycle
latest
Product Category
Teradata Vantage™

You can create work or test tables that are identical to, or based on, base tables in a database. For example, you can use work tables with the same structure as base tables to speed up processing because it is faster to insert rows into a unpopulated work table and later merge the updates into a persistent base table than it is to update the base table directly one update at a time.

You can create test tables that are identical to some or all of the base tables used by live applications for prototyping new applications on a test system.

The AS clause option of CREATE TABLE provides a simple method for copying some or all definitions from an existing table to a new table.

The AS … WITH NO DATA clause copies only the source table or query expression definitions to the new table, while the AS … WITH DATA clause copies both the source table definitions and its data to the new table.

You can also append an AND STATISTICS option to a WITH [NO] DATA clause to copy any collected source table statistics or empty histograms to a target table. If you specify WITH NO DATA AND STATISTICS, the system sets up the appropriate statistical histograms in the dictionary, but does not populate them with source table statistics. This is referred to as zeroed statistics.