是否在INSERT / UPDATE查询中存在多个MySQL子查询?
我打算写以下查询:
INSERT INTO summary (user_id,total_points,count_operations)SELECT 15 AS user_id, (SELECT SUM(points) FROM operations WHERE user_id = 15) AS total_points, (SELECT COUNT(*) FROM operations WHERE user_id = 15) AS count_operationsON DUPLICATE KEY UPDATEtotal_points = VALUES(total_ ...