Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更新查询赢得';我不能在mySQL中工作_Mysql_Sql - Fatal编程技术网

更新查询赢得';我不能在mySQL中工作

更新查询赢得';我不能在mySQL中工作,mysql,sql,Mysql,Sql,我想在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 但是我只想使用一行。如果要更新多个列,而不是和 UPDA

我想在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

但是我只想使用一行。

如果要更新多个列,而不是

UPDATE chambre 
SET    nombre_lit = 5, 
       prix = 10000 
WHERE  code_ch = 2
试试这个:-

Update chambre set nombre_lit = 5 , prix = 10000 where code_ch = 2