开发者

Syntax error when doing an update to modify multiple fields using mysql

开发者_如何学Python

Can I modify the mysql syntax SET more of a sample script:

UPDATE login SET id='21' AND ip='789' WHERE nama='ariel'

Please corrected if I am wrong.


And should be ,

UPDATE login SET id='21', ip='789' WHERE nama='ariel'


I don't think you should use AND like that. Instead I think it should be something more like a list like this:

UPDATE login SET id='21',ip='789' WHERE nama='ariel'

AND is typically used as part of a WHERE clause, not in the list of fields to be updated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜