Link to home
Start Free TrialLog in
Avatar of Dnx_7
Dnx_7Flag for Belgium

asked on

Link 2 primary key between them

Hi experts,

i just want to know if it is a good thing to do such a thing :

i have a primary key in table A and a primary key in table B

i linked primary key A to primary key B

because bot column have same value and have to be unique

thank you in advance.

regards
Avatar of derekkromm
derekkromm
Flag of United States of America image

If both columns are the same/unique, then you should probably combine table A/table B into 1 table. Stick all of the columns (minus the PK) from table B into table A (or vice versa).
Avatar of Dnx_7

ASKER

no i can't modify the structure of table A
because table B is a new table with a "higher" level to achieve new task
table A cannot be modify...

that's why we tried this solution, in management studio, we save the primary key of table A as a foreign key of primary key of table B
and there is no error... and we did some test with success... and we tought that it was the good idea

that's why i'm here to have suggestion of experts

regards
SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dnx_7

ASKER

ok, thank you guys :)

regards