H2 Database - Truncate
TRUNCATE is a command used to delete the data from the table. Unlike DELETE FROM without WHERE clause, this command cannot be rolled back. This command commits an open transaction in this connection.
Following is the generic syntax of the truncate command.
TRUNCATE TABLE tableName
In this example, we will truncate a table named test using the following query.
TRUNCATE TABLE test;
The above query produces the following output.
(6) row (s) effected