Databricks Certified Data Engineer - Associate

Databricks Certified Data Engineer - Associate

Get started today

Ultimate access to all questions.


Which SQL keyword efficiently removes all rows from an existing Delta table without deleting the table itself?





Explanation:

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.