MySQL这样写UPDATE语句,直接劝退!
牛逼!又发现了一款面试题库,太全了!!
(点击查看)
update apps set owner_code='43212' and owner_name='李四' where owner_code='13245' and owner_name='张三';
owner_name的值没有变,但owner_code变成了0!
update apps set owner_code='43212' , owner_name='李四' where owner_code='13245' and owner_name='张三';
update apps set owner_code='43212' and owner_name='李四' where owner_code='13245' and owner_name='张三';
等价于:
update apps set owner_code=('43212' and owner_name='李四') where owner_code='13245' and owner_name='张三';
如有文章对你有帮助,
欢迎关注❤️、点赞👍、转发📣!
评论