INSERT INTO Comment (info, pID, cID) VALUES(?,?,?)
SELECT Comm.cID
FROM Professor P, Comment Comm, Course Cou
WHERE P.pID = Comm.pID
AND Cou.cID = Comm.cID;
So, basically im trying to insert the fields info, pID, and cID, where pID and cID are already populated, but cID is being pulled from the Comment table.
Is this possible? If so, whats wrong with my syntax.
Much appreciated.
Are you really talking about updating rows?
Alternatively if you are simply making new Comment rows derived from the existing data (why?):