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