As SubQuery

Description

Specifies that the new table's columns have the same name, data type, and optionally the same data, as the result from the subquery.

circle-exclamation

Click here arrow-up-rightto navigate to the Ansi SQL docs page for this syntax.

Grammar Syntax

 <as subquery clause> ::=
  [ <left paren>  <column name list>  <right paren>  ] AS <table subquery> 
      <with or without data> 
<with or without data> ::=
    WITH NO DATA
  | WITH DATA

Sample Source Patterns

ANSI SQL Input Code

CREATE TABLE TABLE01 AS
   SELECT
      *
   FROM
      TABLE02 WITH DATA

Snowflake

  1. MSCEWI1002 arrow-up-right: NOT APPLICABLE IN SNOWFLAKE

  2. MSCEWI1099arrow-up-right : CREATE TABLE AS SUBQUERY WITH NO DATA IS NOT SUPPORTED IN SNOWFLAKE, TRANSLATED TO LIMIT 0

Last updated

Was this helpful?