Now, in the last lesson, we looked at how to update records in our tables, and we looked at the SQL
UPDATE statement.
Now, in this lesson, we're going to look at the last letter of CRUD which is DELETE.
And if we wanted to delete records then we can simply write DELETE FROM, table name, WHERE something meets
a certain condition.
So for example if I want to delete my record of my pencil say if I no longer sell pencils anymore in
my shop, then I can simply say DELETE FROM products table, WHERE the name is equal to "Pencil", or what would
be better, is if I actually use its id, WHERE id is equal to 2. Now,
again, be careful that you don't run the statement without a WHERE statement because that will delete
everything in your products table and you'll end up losing all of the data.
So it's again a dangerous statement to execute and make sure that you check your statement before you
hit the Run button.
And now our products table only has one entry left. But through this process you've seen how we can use
the Structured Query Language to Create, Read, Update and Delete data from our SQL table.