Referencing partial primary key? Any way to solve it?

  • Hi everyone. Is it possible to use REFERENCES to refer part of a primary key? I know it isn't because I already tried. The question is: is there any trick to over rule this kind of situation?

    thanks!

  • only if you can put a UNIQUE constraint on that one column of the primary key;

    a foreign key (REFERENCES) can only point to a PK or UQ.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply