Snowpro Core · Free Practice Question Easy
Question 75
Which of the following commands can be used to remove all rows from a table without deleting the table structure in Snowflake?
-
A
DROP TABLE
-
B
TRUNCATE TABLE
-
C
DELETE FROM [table_name]
-
D
CLEAR TABLE
Reveal correct answer
Correct answer: B
A.
The DROP TABLE command deletes the entire table, including its structure and data, which is not what is being asked for.
B.
The TRUNCATE TABLE command is used to remove all rows from a table while retaining its structure. It is a quick way to reset the table without dropping or recreating it.
C.
The DELETE FROM command removes rows but requires a condition; it doesn’t automatically remove all rows unless specified.
D.
There is no CLEAR TABLE command in Snowflake.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
