我想将已解决的时间更新为已创建的时间和状态=已解决的ID列表。
+-------+---------------------+---------------------+--------+
| id | created | Resolved | Status |
+-------+---------------------+---------------------+--------+
| 15367 | 2012-07-11 21:15:05 | 1970-01-01 00:00:00 | new |
| 15370 | 2012-07-11 21:21:12 | 1970-01-01 00:00:00 | new |
| 15374 | 2012-07-11 21:27:28 | 1970-01-01 00:00:00 | new |
| 15377 | 2012-07-11 21:31:06 | 1970-01-01 00:00:00 | new |
+-------+---------------------+---------------------+--------+
答案 0 :(得分:2)
UPDATE
查询有问题吗?
UPDATE myTable SET Resolved = Created, Status = 'Resolved'
WHERE ID IN (15367,15370,15374 ,15377)
答案 1 :(得分:0)
尝试此查询,
更新table_name set Resolved = created,status ='resolved'WHERE id in(15367,15370,15374,15377)