Game lovers have suggested we add a few columns to the rpg_game
table.
Most of them say we should add a column races_no
which will provide the user with the number of races available in each game (an integer value). The users agree that this column should be obligatory for each game.
Another column they'd like to see added is called expansion
. This column of up to 32 characters should provide the name of the first expansion of the RPG game, which is always the most anticipated one. However, some games do not have expansions, so the column should be left empty for those.
Based on the suggestions above, complete the template with two columns. Put a NULL
or NOT NULL
constraint after the type of the column.
Type:
CREATE TABLE rpg_game (
id integer PRIMARY KEY,
name varchar(32) NOT NULL,
genre varchar(32) NOT NULL,
classes_no integer NOT NULL,
complexity integer NOT NULL,
min_players integer NOT NULL,
races_no integer NOT NULL,
expansion varchar(32) NULL
);