So we've covered creating and reading.
Now we're on to updating our shirts.
So the first problem is to update all polo shirts and change their size to be large.
So we'll start by just selecting polo shirts, select star from shirts where article equals polo shirt
just like that.
So this is what we get and what we want to do is change shirt size to be large.
So we need to keep this.
I'll copy it now and then we'll type out update shirts set and we want to change shirt size to now be
large.
And where do we want to do that?
Only where article is polo shirt.
Hit enter.
We get three rows affected.
Three rows changed.
Now if we go back and run our same select, we should see all polo shirts are now largest.
We can do the same thing just to see it in the grand scheme of things.
There we go.
We have three largest now all polo shirts.
The next problem is to update the shirt last worn 15 days ago and change the last one to be zero.
So we'll start by just selecting that shirt like we did earlier where last worn equals 15.
There it is.
Tank top blue.
Medium.
Last, worn 15 days ago.
And we wore it today.
It was a hot day.
We needed a tank top.
And we want to update last one to be zero.
So update shirts set last worn equal to zero where last worn is currently 15.
We get one row affected, one changed.
Let's do our select again.
We no longer have it.
But now if we say select where last one is zero, we have two shirts.
This t shirt that was already there in our blue tank top, we just added perfect.
So the final update is to update all white shirts, change their size to extra small and at the same
time change their color to off white.
So this needs to happen all at once.
You can't do two lines.
I mean, you could, but that's against the rules for this problem.
So.
Let's start off by just selecting all white shirts.
Select star from shirts where color equals white.
Oh, boy.
Let's get rid of that extra l there.
Here we go.
So we have to.
Shirt's a t shirt.
That's white, that's small, and a tank top.
That's white, that's small.
So we want to change color to be off white and shirt size to be extra small because we shrink them and
we mix them with colored stuff in the washing machine.
So their color is now off white.
So to do that, let's start with the first part update shirts and we'll set color to be off white and
then we'll do the second part with a comma.
Shirt size equals X extra small just like that.
And then we'll do our wear color currently equals white and that should do it.
Fingers crossed.
No typos.
Now, if we go back and select where color is white, we should have nothing.
But if we say we're color is off white, we should have two that are extra smalls.
Or we could of course do select star from shirts to check our work.
We have extra small off white, extra small off white.
So that problem is just making sure that you could update multiple fields at once, making sure you
understood that.
That's it for update.
Next, we move on to d delete.