Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Regarding Foreign Key

Author  Topic 

sandesh_moghe
Constraint Violating Yak Guru

310 Posts

Posted - 2001-07-03 : 06:43:27
Can i apply a condition for a FK? e.g.Suppose i have a table called UserRights and i have another two tables called Members(MemberId as PK) and NonMembers(NonMemberId as PK).For UserRight Table i have RightId as PK and want to implement UserId as FK, but if UserId starts by "Mem..." then this key should refer to Members table and if starts by "NonMem...", should refer to Member table.
Is it possible?
Sandesh

   

- Advertisement -