CREATE TABLE world.country (
countrycode BPCHAR(3) NOT NULL,
name_country TEXT NOT NULL,
continent TEXT NOT NULL,
region TEXT NOT NULL,
surfacearea FLOAT4 CHECK (surfacearea>= 0) NOT NULL,
indepyear INT2 NULL,
population_country INT4 NOT NULL,
lifeexpectancy FLOAT4 CHECK (lifeexpectancy>= 0) NULL,
gnp NUMERIC(10, 2) NULL,
gnpold NUMERIC(10, 2) NULL,
localname TEXT NOT NULL,
governmentform TEXT NOT NULL,
headofstate TEXT NULL,
capital INT4 NULL,
code2 BPCHAR(2) NOT NULL,
CONSTRAINT country_continent_check CHECK (
((continent = 'Asia'::text) OR (continent = 'Europe'::text) OR
(continent = 'North America'::text) OR (continent = 'Africa'::text) OR
(continent = 'Oceania'::text) OR (continent = 'Antarctica'::text) OR
(continent = 'South America'::text))),
CONSTRAINT country_pkey PRIMARY KEY (countrycode)
);