P
peterfarge
Hello Forum,
how can I create a Foreign Key within a SQL Table Create Statement?
- Create Table Person (ID Int NOT NULL PRIMARY KEY, Name VARCHAR(255))
- Create Table Employees (ID Int NOT NULL PRIMARY KEY, PersonID INT
NOT NULL FOREIGN KEY REFERENCES Person(ID))
The message is "Syntax Error in Constraint Clause".
Thanks
Peter
how can I create a Foreign Key within a SQL Table Create Statement?
- Create Table Person (ID Int NOT NULL PRIMARY KEY, Name VARCHAR(255))
- Create Table Employees (ID Int NOT NULL PRIMARY KEY, PersonID INT
NOT NULL FOREIGN KEY REFERENCES Person(ID))
The message is "Syntax Error in Constraint Clause".
Thanks
Peter