标签: sql
我正在尝试从一个表中选择数据并将其插入到另一个表中,但我似乎陷入了困境,任何建议都将不胜感激
INSERT INTO replies (statId, reply, dates, userId) VALUES (:addComment, NOW(), :userId) SELECT s.statId FROM status AS s JOIN replies AS r ON s.statId = r.statId