Here is when I added more commas
Here is a similar but simpler query which works in Access 2010.
Notice I defined a Politics_ID
field in the Countries
table to serve as the foreign key field used to reference the Politics
table.
CREATE TABLE Countries(Country_ID INTEGER primary key,Country_name TEXT(255),Politics_ID INTEGER,CONSTRAINT fkPoliticsID FOREIGN KEY (Politics_ID) REFERENCES Politics);
That statement assumes the matching field in the remote table (Politics
) is also named Politics_ID
. However if that remote field has a different name (say Pol_ID
), you can include its name after the remote table name like this:
CONSTRAINT fkPoliticsID FOREIGN KEY (Politics_ID) REFERENCES Politics (Pol_ID)