推荐教程:navicat图文教程
使用navicat批量修改数据,我们只需要选择好要修改的表,然后点击查询,新建查询,在其中输入update语句,来更新数据,更新的内容及哪写数据需要更新都可以在update语句中进行设置。
下面为大家介绍一下update的定义及语法规则。
update 语句用于修改表中的数据。
语法
update 表名称 set 列名称 = 新值 where 列名称 = 某值
person数据表
lastnamefirstnameaddresscity
gates bill xuanwumen 10 beijing
wilson champs-elysees
更新某一行中的一个列
我们为 lastname 是 wilson 的人添加 firstname:
update person set firstname = 'fred' where lastname = 'wilson'
结果
lastnamefirstnameaddresscity
gates bill xuanwumen 10 beijing
wilson fred champs-elysees
更新某一行中的若干列
我们会修改地址(address),并添加城市名称(city):
update person set address = 'zhongshan 23', city = 'nanjing'where lastname = 'wilson'
结果:
lastnamefirstnameaddresscity
gates bill xuanwumen 10 beijing
wilson fred zhongshan 23 nanjing
以上就是navicat怎么批量修改数据的详细内容。