Closed Thread
Results 1 to 1 of 1

Thread: Compound Keys in Access 7?

  1. #1
    ZipOnTrousers is offline Learning Programmer
    Join Date
    Nov 2008
    Posts
    94
    Rep Power
    0

    Compound Keys in Access 7?

    Hi, just wondering what the SQL syntax to create a compound key is in access? This is my SQL:

    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)
    );
    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.
    Last edited by ZipOnTrousers; 11-26-2009 at 10:21 AM.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Compound interest with annual addition
    By Jrb in forum C and C++
    Replies: 1
    Last Post: 03-16-2011, 03:12 PM
  2. Replies: 0
    Last Post: 10-24-2010, 01:14 PM
  3. Compound intrest program in c++
    By thapchi in forum C and C++
    Replies: 4
    Last Post: 03-08-2010, 06:18 PM
  4. help with foreign keys
    By the_code_charmer in forum Database & Database Programming
    Replies: 11
    Last Post: 12-11-2008, 12:30 PM
  5. SSH Keys
    By C3P0 in forum Linux Networking
    Replies: 2
    Last Post: 05-27-2007, 03:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts