Introduction
In this tutorial, we want to update the data in a table by using a SQL Statement. In order to do this, we use the UPDATE Statement.
We have already created the table student with the following data:
![](https://www.deeplearningnerds.com/content/images/2023/10/image-16.png)
Example 1
We want to update the student with the name Cooper. We change the birthdate from 2001-06-08 to 2002-12-01.
We execute the following SQL statement:
UPDATE student
SET birthdate = '2002-12-01'
WHERE name = 'Cooper';
We can see that the data has been successfully updated.
![](https://www.deeplearningnerds.com/content/images/2023/10/image-17.png)
Example 2
We want to update the student with studentid 4. We change the name from Jackie to Megan.
We execute the following SQL statement:
UPDATE student
SET name = 'Megan'
WHERE studentid = 4;
We can see that the data has been successfully updated.
![](https://www.deeplearningnerds.com/content/images/2023/10/image-18.png)
Conclusion
Congratulations! Now you are one step closer to become an AI Expert. You have seen that it is very easy to update the data in a table with the UPDATE 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.