
Explanation:
Option D is CORRECT because the CREATE TABLE new_table AS (SELECT * FROM old_table) WITH NO DATA statement in Amazon Athena creates a new table with the same schema as old_table but does not copy any data. The WITH NO DATA clause explicitly tells Athena to create only the table structure, ensuring that the new table is empty.
Question 51/60
A data engineer needs to create a new empty table in Amazon Athena that has the same schema as an existing table named old_table.
Which SQL statement should the data engineer use to meet this requirement?
A
CREATE TABLE new_table AS SELECT * FROM old_tables;
B
INSERT INTO new_table SELECT * FROM old_table;
C
CREATE TABLE new_table (LIKE old_table);
D
CREATE TABLE new_table AS (SELECT * FROM old_table) WITH NO DATA;
No comments yet.