Changes in new versions / SQL:2008

-- *** before: ***
-- a view over more than one table was read only, and writes
-- went straight to the base tables

-- *** in version 2008: ***
CREATE VIEW big_city AS
SELECT ID, Name, CountryCode, Population FROM city WHERE Population > 1000000;

CREATE TRIGGER big_city_insert
INSTEAD OF INSERT ON big_city
REFERENCING NEW ROW AS n
FOR EACH ROW
INSERT INTO city (ID, Name, CountryCode, Population)
VALUES (n.ID, n.Name, n.CountryCode, n.Population);

-- Support: Oracle since 8i, MS SQL Server since 2000, PostgreSQL 9.1,
-- SQLite (INSTEAD OF on views) and Firebird, which puts ordinary
-- triggers on a view. MySQL has no INSTEAD OF trigger, and Access has
-- no triggers at all.