When i parse query
alter table Z49_tbl (reportid int primary key)
alter table Z49Section1_tbl (reportid int foreign key references Z49_tbl (reportid) on delete cascade)
then i get following error
Server: Msg 170, Level 15, State 1, Line 4
Line 4: Incorrect syntax near '('.
Server: Msg 170, Level 15, State 1, Line 5
Line 5: Incorrect syntax near '('.
Please note that
Z49_tbl is the parent table while Z49Section1_tbl is child table. All i want that if parent recond in Z49_tbl is to be deleted, then its child records in Z49Section1_tbl should also be deleted.
I spent a lot of time to resolve it but could not.
Thanks very much for taking time.
alter table Z49_tbl (reportid int primary key)
alter table Z49Section1_tbl (reportid int foreign key references Z49_tbl (reportid) on delete cascade)
then i get following error
Server: Msg 170, Level 15, State 1, Line 4
Line 4: Incorrect syntax near '('.
Server: Msg 170, Level 15, State 1, Line 5
Line 5: Incorrect syntax near '('.
Please note that
Z49_tbl is the parent table while Z49Section1_tbl is child table. All i want that if parent recond in Z49_tbl is to be deleted, then its child records in Z49Section1_tbl should also be deleted.
I spent a lot of time to resolve it but could not.
Thanks very much for taking time.