All right.
It's the final piece of this exercise solution.
Let's delete all old shirts.
So old, in our case just means more than 200 days ago, which is a very specific number.
We haven't yet seen how to delete things that are not exact matches.
So things that are older than 200 days ago, what about 205 to 50?
400?
Well, it's convenient for us that we don't have any of those values in our database, but we will learn
how to do that.
But for now, that's not what I'm looking for at the moment.
I just want us to delete everything that is exactly 200 days or last worn is exactly 200 days.
So delete.
Don't forget the from a lot of people forget the from delete from shirts.
And I'm kind of breaking my rule because I said I like to select first and make sure.
So let's do that select start from shirts where last.
One equals to 100.
The there are the two shirts.
So instead of selecting, of course we are going to delete from shirts where last one is 200.
Let's do a select star from shirts.
And we should see we've lost a couple of shirts, right?
We don't have any of those old shirts anymore.
What's next?
Deletes all our tank tops.
We can't be caught dead in a tank top anymore.
So once again, select first star from shirts where article.
And in this case, this is a sort of thing that is definitely useful to test first, because I don't
remember if it's tank dash, top tank, top tank, top one word.
All right, this is it, tank space top.
So we see that's what I'm expecting.
I want to delete that.
So then instead of selecting star from, we simply delete from now, if we look for just let's just
select star, we should see no tank tops.
I could also just try and select where article is tank top and we should get an empty set.
There are no matching rows.
Now we're going to delete all the shirts from the table.
Not the entire table.
Keep the table.
Delete the shirts.
Simple deletes from shirts.
Goodbye.
All my shirts.
So the table is still there, but it's empty so I can still describe it.
We don't get an error, but it's empty.
But not for long.
Soon it's going to be gone.
Not just empty, but non-existent.
We're going to drop the entire shirts table.
My closet burned down or something.
I don't know.
Or maybe I just realized it was a stupid idea to put a database to track all my shirts.
So all we do here is drop table shirts, goodbye shirts.
And now I can't describe shirts.
It doesn't exist.
All records are erased.
No trace of my shirts, endeavor.
And that's it for this basic CRUD challenge.