MySQL Forums
Forum List  »  Newbie

Select insert
Posted by: kevin lockard
Date: August 22, 2018 06:37PM

I'm trying to write a SELECT insert query but I seem to be stuck, not sure where I'm going wrong, any advice would be great

INSERT INTO replies (reply, dates, userId, statId)
VALUES ("A string", NOW(), 23,
(SELECT s.statId FROM status AS s JOIN replies AS r ON s.statId = r.statId WHERE s.statId = statId))

Options: ReplyQuote

Written By
Select insert
August 22, 2018 06:37PM
August 22, 2018 11:16PM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.