I need to use create a column in one table and set the values in the column as groups based on values in another table.
I keep getting this error:
ORA-01427: single-row subquery returns more than one row
And this one:
ORA-01400: cannot insert NULL into ("SRUB0001"."GAME"."GAME_ID")
Here is my code:
UPDATE team
SET
no_players = (
SELECT
COUNT(player_id) AS no_players
FROM game
GROUP BY game_id
);