TRUNCATE
This page is part of MariaDB's Documentation.
The parent of this page is: SQL Statements for MariaDB Xpand
Topics on this page:
Overview
Removes all rows from the specified table.
USAGE
Common Syntax:
TRUNCATE [TABLE] <tbl_name> [, <tbl_name> ...]
EXAMPLES
TRUNCATE
To drop a table and re-create it with the same definition, specify the table name:
TRUNCATE customers;
The following statement is equivalent:
TRUNCATE TABLE customers;
TRUNCATE
Multiple Tables
To drop and re-create multiple tables, specify the table names separated by commas:
TRUNCATE TABLE customers, invoices;