Hello, in this video, I'm going to show you how to delete all the rows and a table using the truncate query. We've looked at using the Delete query, which will delete a row or multiple rows based on a particular condition or where a particular column value equals uncle milk. Boy, if you just want to flat out, not delete the entire table, but just delete its content. So maybe you want to sort of reset the table, maybe you're creating a website for testing. And you want to, you know, reset to know when you go live to do a second really simple. So I've got this table called cause.
And this is the latest version that you can see, and I want to delete all of these rows. And imagine if you have like a million rows or five rows, you want to do it manually, you don't do that. So to do it, it's really simple. First of all, as usual, you want to create a query, which equals action and and you just put on truncate, truncate basically means to, you know, get rid of, and you say table. And now we specify the actual table name. So, cause I believe.
And now we need to run this. So we re execute. And now, if I was to, obviously don't do anything yet, but if I reload this, and I'm looking at, as you can see, cause is now empty. Our other table is fine, but this basically deleted all the contents in the cause table. And that's really all there is that you need to know regarding the truncate query. If you have any questions, feel free to pop me a message.
And as usual, I look forward to seeing you in the next video.