HOW TO UPDATE EXISTING RECORDS IN TABLE IN SQL

UPDATE 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.


Leave a Reply

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