A user executes the following SQL query:
create table SALES_BKP like SALES;
What are the cost implications for processing this query?
A user executes the following SQL query:
create table SALES_BKP like SALES;
What are the cost implications for processing this query?
The query 'create table SALES_BKP like SALES;' creates an empty copy of the existing table SALES, meaning it only duplicates the structure (schema) of the table without copying any data. As it does not involve processing actual data or allocating additional storage for data, no significant processing or storage costs should be incurred. The operation primarily utilizes metadata, making it cost-free in terms of both data processing and storage. Thus, no additional costs will be incurred.
C is right.
Snowflake SQL provides “CREATE TABLE LIKE” statement to create a new table with just the structure of the existing table without copying the data. So I think it's C
CREATE TABLE … AS SELECT (creates a populated table; also referred to as CTAS) CREATE TABLE … USING TEMPLATE (creates a table with the column definitions derived from a set of staged files) CREATE TABLE … LIKE (creates an empty copy of an existing table) CREATE TABLE … CLONE (creates a clone of an existing table)
CREATE TABLE … LIKE (creates an empty copy of an existing table) https://docs.snowflake.com/en/sql-reference/sql/create-table
CREATE TABLE … LIKE (creates an empty copy of an existing table) source : https://docs.snowflake.com/en/sql-reference/sql/create-table
C is correct
Correct
CREATE TABLE LIKE creates an empty copy. It should use only metadata to create so it shouldn't need a warehouse/compute or storage. https://docs.snowflake.com/en/sql-reference/sql/create-table#create-table-like
should be C