COF-C02 · Question #162
Files have been uploaded to a Snowflake internal stage. The files now need to be deleted. Which SQL command should be used to delete the files?
The correct answer is C. REMOVE. In Snowflake, the REMOVE command (also aliased as RM) is used to delete one or more files from an internal or external stage. The syntax is: REMOVE @stage_name/path/filename. DELETE is a DML command for removing rows from tables, not files from stages. PURGE is a parameter used…
Question
Files have been uploaded to a Snowflake internal stage. The files now need to be deleted. Which SQL command should be used to delete the files?
Options
- APURGE
- BMODIFY
- CREMOVE
- DDELETE
How the community answered
(27 responses)- A4% (1)
- C93% (25)
- D4% (1)
Explanation
In Snowflake, the REMOVE command (also aliased as RM) is used to delete one or more files from an internal or external stage. The syntax is: REMOVE @stage_name/path/filename. DELETE is a DML command for removing rows from tables, not files from stages. PURGE is a parameter used within COPY INTO to delete staged files after a successful load, not a standalone command. MODIFY is not a valid Snowflake SQL command for this purpose.
Topics
Community Discussion
No community discussion yet for this question.