Which command below will only copy the table structure from the existing table to the new table?

Which command below will only copy the table structure from the existing table to the new table?
A . CREATE TABLE … AS SELECT
B. CREATE TABLE … LIKE
C. CREATE TABLE … CLONE

Answer: B

Explanation:

CREATE TABLE … LIKE

Creates a new table with the same column definitions as an existing table, but without copying data from the existing table. Column names, types, defaults, and constraints are copied to the new table: CREATE [ OR REPLACE ] TABLE <table_name> LIKE <source_table> [ CLUSTER BY ( <expr> [ , <expr> , … ] ) ]

[ COPY GRANTS ]

[ … ]

https://docs.snowflake.com/en/sql-reference/sql/create-table.html#create-table

Latest ARA-C01 Practice Questions with 156 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments