How to update two columns in a MySQL database?

前端 未结 1 1084
你的背包
你的背包 2021-02-05 03:46

This doesn\'t work:

UPDATE customers SET firstname=\"John\" AND lastname=\"Smith\" WHERE id=1;
相关标签:
1条回答
  • 2021-02-05 04:10

    Separate values with commas. AND is an logical operator, its place is in WHERE and ON clauses.

    UPDATE customers SET firstname="John", lastname="Smith" WHERE id=1;
    
    0 讨论(0)
提交回复
热议问题