Hi, just wondering what the SQL syntax to create a compound key is in access? This is my SQL:
But how would you make a compound key out of both emp_id and project_id? Everything I've tried has produced an error, and there is little to nothing available on the online help or even after a few google searches.Code:CREATE TABLE Employee ( employee_id CHAR(12) PRIMARY KEY, proj_id CHAR(3), count NUMBER, CONSTRAINT EmployeeFK1 FOREIGN KEY (employee_id) REFERENCES Employee(employee_id), CONSTRAINT EmployeeFK2 FOREIGN KEY (proj_id) REFERENCES Project(proj_id) );
Last edited by ZipOnTrousers; 11-26-2009 at 10:21 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks