Per una chiave esterna inline, non puoi utilizzare la foreign key
parola chiave. Hai anche un ,
penzolante alla fine:
CREATE TABLE BOOK
(
ISBN INTEGER PRIMARY KEY,
year integer CHECK (year BETWEEN 1900 AND 2016),
title varchar (60) REFERENCES FORFATTER (BOK),
publisher utgiver varchar (90) --<<< remove the comma here
);
In alternativa:
CREATE TABLE BOOK
(
ISBN INTEGER PRIMARY KEY,
year integer CHECK (year BETWEEN 1900 AND 2016),
title varchar (60),
publisher utgiver varchar (90), --<< for this syntax you need the comma
foreign key (title) REFERENCES FORFATTER (BOK)
);