SnowPro Advanced: Data Engineer — Question 87
A Data Engineer would like to create a new empty table named CURRENT_STUDENT_COPY_DATA that has the same structure as the table CURRENT_STUDENT.
Which statement should be used?
Answer options
- A. CREATE TABLE current_student_copy_data COPY current_student;
- B. CREATE TABLE current_student_copy_data CLONE current_student COPY_DATA=false;
- C. CREATE TABLE current_student_copy_data CLONE current_student;
- D. CREATE TABLE current_student_copy_data LIKE current_student;
Correct answer: D
Explanation
The correct answer is D because the 'LIKE' clause creates a new table with the same structure as the specified existing table without copying any data. Options A and B incorrectly use 'COPY', which is not a valid method for creating an empty table with the same structure, while C uses 'CLONE', which creates a copy of the table including its data.