I've got two tables, one called PLAYERS
with this structure:
PLAYERS (name, team, goals, cod)
and another one called NEW_PLAYERS
with this structure:
NEW_PLAYERS (name, team, goals)
I want to insert values from NEW_PLAYERS
into PLAYERS
setting the value 1 for the register cod
of all of NEW_PLAYERS
.
I thought this code could work but it doesn't.
INSERT INTO PLAYERS (name, team, goals, cod)
VALUES ((SELECT name, team, goals FROM NEW_PLAYERS), 1);
Does anyone have a better option?