您当前的位置: 首页 > 

Unsafe query: ‘Update‘ statement without ‘where‘ updates all table rows at once

发布时间:2021-03-11 16:14:31 ,浏览量:0

-- Unsafe query: 'Update' statement without 'where' updates all table rows at once

没有任何约束的情况下,当前指定数据表中的所有数据行全部执行修改操作。这很危险! 一定要带有where条件约束:

update person set id = 10; -- OK
update person set id = 10 where name = 'java'; 

可以同时修改多个数据,不同的字段赋值操作使用 逗号隔开

update person set id = 20, age = 10, salary = 200000.01 where name = 'java'; 
关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    115984博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0828s