how to reference key of one table which is stored as Key + identity as Primary key in another table

ساخت وبلاگ
چکیده : Vote count: 0 I got one old db of some... با عنوان : how to reference key of one table which is stored as Key + identity as Primary key in another table بخوانید :

Vote count: 0

I got one old db of some size (few gbs). I got issues with 2 tables, One table uses one RoleId which associates many different co-roles and are stored in another table say Co-Role Table. Since same RoleId may have many co-roles, CoRole table used (RoleId + Identity) AS primary key. I want to add one Foreign key (from Role to CoRole) to optimize the query time. But I can only refer RoleId from table 1, I am not sure How to refer (RoleId + Key) from table1. May be this is not the best way to optimize such tables for query, looking suggestions to improve the query time.

asked 27 secs ago
vikas

back soft...
ما را در سایت back soft دنبال می کنید

نویسنده : استخدام کار بازدید : 25 تاريخ : پنجشنبه 28 تير 1397 ساعت: 1:43