Notes MySQL update or modify data update

Modify / update (update table name set column 1 = value 1 column 2 = value 2)

Modify all the fields in the table to be the same: update teacher set age = 20; meaning to change all the age fields in the table to 20

Update a piece of data in the table: update teacher set age = age + 3 where id = 3; put the data age of id = 3 on the original basis +3

update teacher set is_delete = 0; modify the is_delete field to 0, indicating that the data has not been deleted; query the deleted data: select * from teacher where is_delete = 1;

Guess you like

Origin www.cnblogs.com/will-wu/p/12717507.html