SQL Update – SQL TUTORIAL | Software Testing Material

SQL Update Query:

The SQL UPDATE statement is used to update records in a table.

SQL UPDATE Query Syntax:

Here the WHERE clause specifies which record should be updated. If we didn’t mention WHERE clause then all the records will be updated.


Following statement would update the value in the column name ‘Balls‘ of ‘SCOREBOARD’ table to ‘25‘ where the ‘Playername’ is equal to ‘Dravid.

In the above query, we have specified WHERE Playername=’Dravid’. So only the data related to Playername=’Dravid’ gets updated. If not, all records will be updated.

SQL Update

In the above screenshot, value in the Balls column related to Playername Dravid is 30 based on first SELECT Query and the value in the Balls column related to the same Playername is 25 based on the second SELECT Query.

In the next tutorial, we will see How To DELETE Data in a Table in SQL

Check out the complete SQL Tutorial by clicking on below link:

SQL Tutorial – Complete

Sharing is caring.

Share on facebook
Share on twitter
Share on linkedin

Like This Post?

We have a lot more where that came from?

We only send really good stuff occasionally, promise.

Rajkumar SM

Leave a Comment

Your email address will not be published. Required fields are marked *

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on whatsapp

Recent Posts:

Scroll to Top
API Testing eBook