יצירת Relationship בין Table ל-View

גרי רשף

New member
יצירת Relationship בין Table ל-View

בדטה-בייס אחד יש לי טבלת ישובים ובדטה-בייס שני טבלת אנשים. אני רוצה להבטיח שקודי הישוב בטבלת האנשים יבואו מטבלת הישובים. כיצד אני עושה זאת? ניסיתי ליצור View המקושר לטבלת הישובים בדטה-בייס האחר, אך במסך ה-Relationship לא ניתן להציג אותו. מה האלטרנטיבה?
 

eli_leiba

New member
ניתן ליישם את אכיפת האילוץ בטריגרים

hello geri fk only work in case both tables primary and son exists in same !!database to do what you ask is to create a trigger on the son table that will work in insert and update and check the the inserted chached table has only ids of the yishuvim in the second database Note: if the second database is not in the same server you have to create a linked server and then use a trigger the case were the databases are in the same server is simpler just a trigger
 
למעלה