Hi, can I habe multi table indices to ensure that certain IDs can only appear in on relation? Like table_0(id int), table_1(id int), table_2(id int) rel_1_to_0( id_1 int, id_0 int ) rel_2_to_0( id_2 int, id_0 int ) An id of table_0 should only exist either in rel_1_to_0 OR rel_2_to_0. How can I do this? regard Andreas
Andreas wrote: > can I habe multi table indices to ensure that certain IDs can only > appear in on relation? > > Like > > table_0(id int), table_1(id int), table_2(id int) > rel_1_to_0( id_1 int, id_0 int ) > rel_2_to_0( id_2 int, id_0 int ) > > An id of table_0 should only exist either in rel_1_to_0 OR rel_2_to_0. You cannot have one index across several tables. > How can I do this? Perhaps with a trigger that checks if the condition is satisfied. Yours, Laurenz Albe
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера