

If you're only trying to change the index in your CTAS operation, and the source table is hash distributed, maintain the same distribution column and data type. To convert the previous example to CTAS: CREATE TABLE. With CTAS, on the other hand, you can specify both the distribution of the table data as well as the table structure type. by using the default distribution type of ROUND_ROBIN, and the default table structure of CLUSTERED COLUMNSTORE INDEX. SELECT.INTO doesn't allow you to change either the distribution method or the index type as part of the operation. The following is an example of a simple SELECT.INTO: SELECT *

CTASĬTAS is a more customizable version of the SELECT.INTO statement. CTAS is the simplest and fastest way to create and insert data into a table with a single command.

CTAS is a parallel operation that creates a new table based on the output of a SELECT statement. The CREATE TABLE AS SELECT (CTAS) statement is one of the most important T-SQL features available. This article explains the CREATE TABLE AS SELECT (CTAS) T-SQL statement in dedicated SQL pool (formerly SQL DW) for developing solutions.
