Javatpoint Logo
Javatpoint Logo

MariaDB TRUNCATE table Statement

In MariaDB database, TRUNCATE TABLE statement is used to delete all records from a table. It is same as DELETE statement without a WHERE clause.

Note: If you use the TRUNCATE table statement, the table will be deleted permanently and cannot be rolled back.

Syntax:

Example:

Let's truncate the table "Students".

Mariadb Truncate table statement 1

The TRUNCATE query is executed successfully. You can see that the records of "Student" table have been deleted permanently.

Output:

Mariadb Truncate table statement 2

There is no data in "Student" table.


Next TopicMariaDB Where





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA