Home >Backend Development >PHP Tutorial > 哪位大侠能够一条sql语句执行更新多条记录,该如何解决

哪位大侠能够一条sql语句执行更新多条记录,该如何解决

WBOY
WBOYOriginal
2016-06-13 13:42:59736browse

哪位大侠能够一条sql语句执行更新多条记录
id num
1 1
2 2
3 4
4 8


表名test

最终结果
id为1的, 更新为2
id为2的,更新为3
id为3的,更新为6
id为4的,更新为11



------解决方案--------------------
如果不是相同的是无法一起更新的.看看有没其他神奇的写法吧

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn