This is not valid syntax for an INSERT
command.
Try this:
INSERT INTO ListsAndPlayers (ListsAndPlayersID, ListID, PlayerID)
VALUES (42,
(SELECT ListID FROM Lists WHERE ListName = 'Los Angeles Dodgers'),
(SELECT PlayerID FROM Players WHERE PlayerName = 'Clayton Kershaw'));
If you had declared the ListsAndPlayersID
column as INTEGER PRIMARY KEY
, SQLite would automatically generate a value.
(You could also drop the ListsAndPlayersID
column and just use the combination of ListID
and PlayerID
as primary key.)