fyzfeech@yahoo.com (feech) writes:
> INSERT INTO results (PlayerID, Position) values (SELECT players.id
> from players WHERE name = 'Chuck', 4 );
You need to put parentheses around the sub-select used as an
expression:
INSERT INTO results (PlayerID, Position) values ((SELECT players.id
from players WHERE name = 'Chuck'), 4 );
A more conventional way to get the same result is
INSERT INTO results (PlayerID, Position)
SELECT id, 4 FROM players WHERE name = 'Chuck';
regards, tom lane