Изменения в новых версиях / SQL:2011

-- *** before: ***
-- "from" and "to" columns were plain dates, and nothing stopped
-- two overlapping rows from being stored for one country

-- *** in version 2011: ***
CREATE TABLE country_head (
    Code        CHAR(3),
    HeadOfState VARCHAR(60),
    Start_date  DATE,
    End_date    DATE,
    PERIOD FOR term_period (Start_date, End_date),
    PRIMARY KEY (Code, term_period WITHOUT OVERLAPS)
)

-- Support: Oracle 12c has Temporal Validity with its own PERIOD FOR
-- clause, MariaDB 10.4 has application time periods; among the seven
-- dialects of this edition nobody supports WITHOUT OVERLAPS. In
-- PostgreSQL the same rule is written as an EXCLUDE constraint over a
-- range type.