UPDATE personSET Lname=’Gupta’,Fname=’Ajit’,WHERE person_id < 10;/* person_id is a primary key */
Discuss in Forum
UPDATE EmployeeSET Lname=’Gupta’,Fname = ’Ajit’,WHERE Emp_id = 101; /* person_id is a primary key */
The ‘UPDATE’ statement in MySQL has its own syntax. The ‘SET’ keyword is followed by an assignment list which indicates the set of columns whose value needs to be updated with a specified value.