How to Update Records in MySQL Table
Notes:
How to update a record in a table in MySQL:
- To update a record(s) in a table; we take help of update command
Note: in MySQL
- tables are also called relations
- columns are also called fields
- rows are also called records
Basic Syntax:
update tablename set columnname=newvalue where columnname=matchingvalue;
Ex:
update tbl_faculty set salary=5000 where id=2;
Interview Questions: