Instruction
Good job! Just like with primary and foreign key constraints, you can also add a custom name to your UNIQUE constraints. Check out this table:
CREATE TABLE video_game ( id integer PRIMARY KEY, name varchar(64), platform varchar(64), price decimal(6, 2) );
You can add a constraint like this:
ALTER TABLE video_game ADD CONSTRAINT video_game_unique UNIQUE (name, platform);
The instruction above will create a new unique constraint and name it video_game_unique.
Exercise
Again, we've got the table named card_game defined like this:
CREATE TABLE card_game ( id integer PRIMARY KEY, name varchar(64) UNIQUE, rank integer );
Add a UNIQUE constraint on the rank column. This time, however, provide the custom constraint name card_game_rank_unique.



