I\'m learning how to use sqlite3 with python. The example in the text book I am following is a database where each Country record has a Region, Country, and Population.
Country_key is simply giving a name to the constraint. If you do not do this the name will be generated for you. This is useful when there are several constraints on the table and you need to drop one of them.
As an example for dropping the constraint:
ALTER TABLE PopByCountry DROP CONSTRAINT Country_Key
If you omit CONSTRAINT Contry_Key from the statement, SQL server will generate a name for your PRIMARY KEY constraint for you (the PRIMARY KEY is a type of constraint).
By specifically putting CONSTRAINT in the query you are essentially specifying a name for your primary key constraint.