UPDATE
mine
SET
reason = 'is this possible?',
deleted = 1,
WHERE id = '1'
GROUP BY date
我想更新2行不同的id但值相同,这可能吗?
答案 0 :(得分:2)
您可以同时更新任意数量的行。例如,要更新ID 1和2:
UPDATE mine
SET reason = 'is this possible?',
deleted = 1
WHERE id IN (1, 2);
实际上,您可以完全省略WHERE
子句并更新表中的所有行。
我不确定您为什么GROUP BY date
,但date
似乎与查询无关。