Postgresql 7.4.3-1 under Cygwin.
I created a table called ServerTypes:
CREATE TABLE ServerTypes(
ServerTypeID SERIAL UNIQUE NOT NULL,
Type TEXT PRIMARY KEY);
Works fine.
Now, I want to create a table called servers with a Foreign Key
referencing ServerTypes.Type:
CREATE TABLE Servers(
ServerID SERIAL UNIQUE NOT NULL,
Type REFERENCES ServerTypes (Type),
Server TEXT PRIMARY KEY);
This command produces the following error:
ERROR: syntax error at or near "REFERENCES" at character 61
I see nothing wrong with the syntax and I'm baffled. Anyone have any
idea why this isn't working?