MySql:如何通过检查where子句中的多个字段来更新表的列?

时间:2016-04-06 12:11:07

标签: mysql

我试过这种方式

update message set status='Accepted' where tid=' ' and ltime=' ' and ldate=' ';

但它在语法中显示error

我的行是通过这三个字段唯一标识的。

1 个答案:

答案 0 :(得分:0)

由于状态reserved keyword

试试这个

update message 
set `status`='Accepted' 
where tid=' ' and ltime=' ' and ldate=' ';

Keywords and Reserved Words in MySQL