What does **CTAS** primarily accomplish in SQL?
A) Creates a virtual table that updates automatically
B) Adds constraints like primary keys to an existing table
C) Creates a physical table from a SELECT query result
**Explanation:** CTAS stores the result of a SELECT query as a new physical table, capturing data and data types.
D) Deletes rows from a table based on conditions
How does a table created by **CTAS** differ from a regular view?
A) It updates automatically with source data changes
B) It is static and requires manual recreation for updates
**Explanation:** Unlike views, CTAS produces a static snapshot that does not change until dropped and recreated.
C) It includes primary keys and indexes by default
D) It cannot be queried like other tables
Which elements are **excluded** when using **CTAS** to create a table?
A) Primary keys, foreign keys, and indexes
**Explanation:** CTAS copies only data and data types, omitting constraints like keys and indexes.
B) Data and data types
C) Column names from the SELECT
D) Rows matching the WHERE clause
Score: 0 / 3