UPDATE in SQL

HOW TO UPDATE EXISTING RECORDS IN TABLE IN SQL?

UPDATE

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

Syntax-

UPDATE <table_name>

SET column1 = value1, column2 = value2, โ€ฆ

WHERE <condition>;

Example-

UPDATE mstudentsnew

SET st_name = โ€˜Ajaiโ€™

WHERE st_id = 1;

Note- IF WHERE Clause is not used it will update all the records.


Posted

in

Tags:

Comments

Leave a Reply