English 中文(简体)
H2 Database - Truncate
  • 时间:2024-12-27

H2 Database - Truncate


Previous Page Next Page  

TRUNCATE is a command used to delete the data from the table. Unpke DELETE FROM without WHERE clause, this command cannot be rolled back. This command commits an open transaction in this connection.

Syntax

Following is the generic syntax of the truncate command.

TRUNCATE TABLE tableName 

Example

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 
Advertisements