Surrogate Key Vs Foreign Key

  • Hi,

    I have a child table(C) which has the composite primary key(A1+B1) from Table A and B.

    Now i want to create a surrogate key in table C which should be a foreign key for another table D.

    Is it possible, to reference a non primary key as foreign key to another table?

    Regards,

    Santhosh.

  • You can reference a unique constraint when making a foreign key. It's that or a primary key.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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