Foreign Key between federated tables in SQL Azure -


i have problem..

i need define foreign keys between federated tables, , cant it.. have 2 tables...

create table tarifa( [cp_id] [int] not null, [id] [uniqueidentifier] not null, [nombre] [varchar](200) not null, [comision] [decimal](18, 2) null, [markup] [decimal](18, 2) null, primary key (id,cp_id) ) federated on (cp_id=cp_id)   create table periodo( [cp_id] [int] not null, [id] [uniqueidentifier] not null, [tarid] [int] not null, [precio] [decimal](18, 2) null, primary key (id,cp_id) ) federated on (cp_id=cp_id) 

i want reference field tarid in periodo tarifa. possible?

you can reference federated table restrictions.

from federation guideline , limitations:

all foreign key constraints on federated tables need include federation column on both referrer , referenced tables @ same ordinal in foreign key. reference tables cannot have foreign key relationships federated tables. federated tables can have foreign key relationships reference tables without restrictions.

in case have include federated column on both tables.


Comments