Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 MySQL 中执行查询,但它不起作用。这是查询:
Update chambre set nombre_lit = 5 and prix = 10000 where code_ch = 2
如果我执行此脚本,它将起作用:
Update chambre set prix = 10000 where code_ch = 2 Update chambre set nombre_lit = 5 where code_ch = 2
但我只想使用一条线。
COMMA如果您有多个列要更新而不是使用AND
COMMA
AND
UPDATE chambre SET nombre_lit = 5, prix = 10000 WHERE code_ch = 2
试试这个:-
Update chambre set nombre_lit = 5 , prix = 10000 where code_ch = 2