简体   繁体   English

字段中的mysql change id是另一个字段=“ transfer”

[英]Mysql change id in field is another field = “transfer”

Im new to mysql and would like to know how i would say in code. 我是mysql的新手,想知道我在代码中怎么说。 if Narrive = "transfer" then change AccountID to 2001 如果Narrive =“ transfer”,则将AccountID更改为2001

please could some one give me a step by step on his and please explain where i would put this code as well because i have no clue. 请有人可以一步一步地给我,请解释一下我将把这段代码放在哪里,因为我不知道。

UPDATE tableName
SET AccountID='2001'
WHERE Narrive="transfer" 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM