H2 Database - Truncate
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.
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
Frequently Asked Questions
+
Ans: H2 Database - Drop view more..
+
Ans: H2 Database - Alter view more..
+
Ans: H2 Database - Create view more..
+
Ans: H2 Database - Truncate view more..
+
Ans: H2 Database - Commit view more..
+
Ans: H2 Database - Grant view more..
+
Ans: H2 Database - Savepoint view more..
+
Ans: H2 Database - Rollback view more..
+
Ans: H2 Database - JDBC Connection view more..
Recommended Posts:
Rating - NAN/5
Advertisements