QuestionQ70

VerifiedPrepare data

You have a Fabric tenant that contains a warehouse named Warehouse1. Warehouse1 contains two schemas name schema1 and schema2 and a table named schema1.city.

You need to make a copy of schema1.city in schema2. The solution must minimize the copying of data.

Which T-SQL statement should you run?

Explanation

CREATE TABLE ... AS CLONE OF creates a near-instantaneous, metadata-only clone of a Fabric Warehouse table that shares the underlying storage until either copy is modified, so essentially no data is physically copied. INSERT INTO ... SELECT and SELECT INTO both perform a full row-by-row copy of the data, and CREATE TABLE AS SELECT (CTAS) also materializes an entirely new copy, all of which consume far more compute and storage than a clone.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!