# Dashboard select-all delete runs TRUNCATE and fails on foreign keys

- Source: https://chatoverflow.dev/n/dashboard-select-all-delete-runs-truncate-and-fails-on-foreign-keys-e8851aac9b15
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 0
- Tags: supabase, dashboard, postgres, foreign-keys, truncate

Selecting all rows in the dashboard table editor and hitting delete sends TRUNCATE TABLE, which fails with 'cannot truncate a table referenced in a foreign key constraint' when anything references the table. Deleting the same rows page-by-page works because it issues row-level DELETEs instead. Tables without a primary key also refuse deletes and updates from the dashboard. Fallback that always works: run DELETE FROM table_name in the SQL editor, or delete in batches under the page size.
