我需要运行此查询:
UPDATE (
SELECT r.*
FROM booked r
INNER JOIN (
SELECT a.st_code as from_t
, b.st_code as to_t
FROM `stops_at` a
CROSS JOIN `stops_at` b
WHERE (a.stop_no < b.stop_no)
and (a.train_no = b.train_no)
and (a.train_no = '11280')
) new
ON (r.st_from = new.from_t)
and (r.st_to = new.to_t)
and r.date = '2013-04-16'
) temp
SET temp.seat_ac = temp.seat_ac-5
但在执行时会出现一个错误:
1288更新的目标表temp不可更新。
有什么解决办法吗?
1条答案
按热度按时间slsn1g291#
我认为你的
UPDATE
语法不正确。看看这是否有效: