SQL Update Statement

OBJECTIVE

In this chapter you will learn:

About update statement
Syntax of update statement
Example of update statement

 

About update statement

SQL update statement is used to modify or edit the record which is inserted in the table. Sometime user inserts some wrong values so it needs to modify or edit.

 

Syntax of update statement

update table_name set column_name= value where condition

Example of update statement

Records of the table book before update

table record before update

 

Record of table book is updated with update table statement

In the given example chapters_no is the column of book table which is modified as 40 so its previous value will be changed.

 

update statement

 

SUMMARY

In this chapter you have learned about delete statement, one example is also given for your better guide so try to use this statement with yourself and click on next button to know about SQL injection statement.


Leave a Reply

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