The game lovers suggested we add a few columns to the table rpg_game
.
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 which should be 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 awaited one. However, some games do not have expansions, so the column should be left empty.
Based on the description above, complete the template with two columns. Each time put a NULL
or NOT NULL
constraint after the type of the column.
Type
CREATE TABLE rpg_game (
id IDENTITY PRIMARY KEY,
name varchar(32) UNIQUE NOT NULL,
genre varchar(32) NOT NULL,
classes_no int NOT NULL,
complexity int NOT NULL,
min_players int NOT NULL,
races_no integer NOT NULL,
expansion varchar(32) NULL
);