In this tutorial, we want to delete all rows from a table by using a SQL Statement. The table itself should remain. In order to do this, we use the TRUNCATE Statement.

We have already created the table student with the following data:

SQL Statement

Now, let's delete all rows from the table student. We execute the following SQL statement:


Deleted Data

We can see that the rows have been successfully deleted. The table itself and its structure remain unchanged.


Congratulations! Now you are one step closer to become an AI Expert. You have seen that it is very easy to delete all rows from a table with the TRUNCATE Statement. Try it yourself!


Also check out our Instagram page. We appreciate your like or comment. Feel free to share this post with your friends.