The country table

This article introduces the structure of the country table in the Sakila database.

The country table contains a list of countries or regions.

The city table refers to the country table using a foreign key.

Table Structure

The structure of the country table is as follows:

+-------------+-------------------+------+-----+-------------------+-----------------------------------------------+
| Field       | Type              | Null | Key | Default           | Extra                                         |
+-------------+-------------------+------+-----+-------------------+-----------------------------------------------+
| country_id  | smallint unsigned | NO   | PRI | NULL              | auto_increment                                |
| country     | varchar(50)       | NO   |     | NULL              |                                               |
| last_update | timestamp         | NO   |     | CURRENT_TIMESTAMP | DEFAULT_GENERATED on update CURRENT_TIMESTAMP |
+-------------+-------------------+------+-----+-------------------+-----------------------------------------------+

Table Columns

The following table explains all columns in the country table.

Column Description
country_id The surrogate primary key used to uniquely identify each country/region in the table.
country The name of the country.
last_update The time when the row was created or last updated.