how to reference key of one table which is stored as Key + identity as Primary key in another table | بلاگ

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

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