HF RL Explorer

Truncate a SQLite Table If It Exists

Truncate a SQLite Table If It Exists: a task in Terminal-Lego-15k (Harbor dataset). In SQLite, the standard DELETE FROM tableName command will throw an error if the table does not exist. Your task is to create a solution that safely truncates (deletes all rows from) a SQLite table only if it…

The task

In SQLite, the standard `DELETE FROM tableName` command will throw an error if the table does not exist. Your task is to create a solution that safely truncates (deletes all rows from) a SQLite table only if it exists, without throwing an error if the table is missing.

Part of PrimeIntellect/Terminal-Lego-15k.