Introduction
In this tutorial, we want to delete specific rows from a table by using a SQL Statement. In order to do this, we use the DELETE Statement.
We have already created the table student with the following data:
Example 1
We want to delete all rows where the name is Ava.
We execute the following SQL statement:
DELETE FROM student
WHERE name = 'Ava';
We can see that the data has been successfully deleted.
Example 2
We want to delete all rows where the studentid is 2.
We execute the following SQL statement:
DELETE FROM student
WHERE studentid = 2;
We can see that the data has been successfully deleted.
Conclusion
Congratulations! Now you are one step closer to become an AI Expert. You have seen that it is very easy to delete specific rows from a table with the DELETE Statement. Try it yourself!
Also check out our Instagram page. We appreciate your like or comment. Feel free to share this post with your friends.