Example: CREATE TABLE AS … WITH NO DATA with Named Expressions - Teradata Vantage - Analytics Database

SQL Data Definition Language Syntax and Examples

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
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

This CREATE TABLE AS … WITH NO DATA request creates target_table from a subquery where all column expressions are named explicitly. No column names are defined for target_table because it is unnecessary.

Because the request specifies a subquery and no explicit table kind is specified, the table kind of target_table defaults to the session mode default, not to the table kind of subquery_table.

     CREATE TABLE target_table AS (SELECT column_x + 1 AS column_x,
                                          column_y + 1 AS column_y
                                   FROM subquery_table )
     WITH NO DATA;