To delete all records of a table such that the table cannot be rolled back, the MariaDB TRUNCATE TABLE statement is used. It is much similar to the DELETE TABLE statement without a WHERE clause.
TRUNCATE TABLE database_name.table_name
database_name: It is used to specify the name of the database to select.
table_name: It is used to specify the name of the table to be truncated.
TRUNCATE TABLE celebrities.players;
In the above example we are deleting all the records of the ‘players’ table which is an already existing table in the ‘celebrities’ database. Check the table using the SELECT statement.
SELECT* FROM players;