1、修改数据。
接着上节课的数据来操作,这个名字叫做‘Li’的同学实际是 65.20 分,登记时登错了,看看我们如何来修改
update exam_score set score = 65.20 where id = 4;
当然了,也可以同时更改多个字段的数据,赋值语句中间用逗号(,)隔开就好了
除了这种方法,我们也可以用 replace 来代替,比如这为id为5的同学改名字子,由’Zhao’改为’Jack’
方法1:update exam_score set name = 'Jack' where id = 5;
方法二:update exam_score set name = replace(name,'Zhao','Jack') where id = 5;