Locked lesson.
About this lesson
We can use DELETE FROM to remove data from the SQL database
Exercise files
Download this lesson’s related exercise files.
DELETE Statement.docx59 KB DELETE Statement - Solution.docx
59.4 KB
Quick reference
DELETE Statement
DELETE FROM allows us to remove data from our table.
When to use
Use it whenever you want to remove something from your table using SQL.
Instructions
DELETE FROM [dbo].[Current_Customers]
WHERE [First Name] LIKE 'Tracy'
This will delete any customers with the first name 'Tracy' from the current customers database.
To delete all the data from your table, use Delete From without a Where Clause:
DELETE FROM [dbo].[Current_Customers]
Hints & tips
- Remove items from your table with DELETE FROM
- Remember to use WHERE
- If you don't use WHERE, it will delete all the data in your table
Lesson notes are only available for subscribers.