TRUNCATE

The TRUNCATE statement removes all rows from a table efficiently.

Basic Syntax

TRUNCATE TABLE table_name;

Example

-- Remove all rows (faster than DELETE)
TRUNCATE TABLE logs;

Note: TRUNCATE is faster than DELETE for removing all rows because it doesn’t log individual row deletions.


Copyright © 2025-2026 Oxibase Contributors. Gabriel Maeztu.