
Answer-first summary for fast verification
Answer: TRUNCATE
The `TRUNCATE TABLE` command in Databricks SQL is designed to remove all rows from a table or specified partitions efficiently, without deleting the table itself. It is more efficient than using the `DELETE` command for this purpose. The table must not be a view or an external/temporary table. Cached data of the table and its dependents are also cleared, with the cache being lazily filled upon next access. Syntax: `TRUNCATE TABLE table_name [ PARTITION clause ]`. Learn more about truncating tables in Databricks SQL.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.