how can delete data without drop relation ship between tables???
-
i have to delete data but i have problem found relation between tables so i cant delete data how can delete data without drop relation ship between tables??? Rami Abd Alhalim
-
i have to delete data but i have problem found relation between tables so i cant delete data how can delete data without drop relation ship between tables??? Rami Abd Alhalim
If I am understanding you correctly, you can not do this. That is the purpose of the foreign key constaint. It will not allow you to delete the data without dropping the relationship between the tables. The only other options is to delete data from all the tables in the correct sequence. Hope that helps. Ben
-
i have to delete data but i have problem found relation between tables so i cant delete data how can delete data without drop relation ship between tables??? Rami Abd Alhalim
set particular column's constraint as Delete Rule as Set null and Update Rule as Set null You can find this option where you define the relationship of tables. it is titled with "Insert and Update Specification" of sql server management studio. divyesh
-
If I am understanding you correctly, you can not do this. That is the purpose of the foreign key constaint. It will not allow you to delete the data without dropping the relationship between the tables. The only other options is to delete data from all the tables in the correct sequence. Hope that helps. Ben
Thanks how correct sequence
-
Thanks how correct sequence
It depends on how your tables are related. Let's say you had: ParentTable1 ChildTable1 ChildTable2 Both ChildTable1 and ChildTable2 have parenttable1ID which is the key. All of the records in childTable1 and childTable2 that have that parenttable1ID must be deleted before the record in ParentTable1 with parenttable1id can be deleted. The benifit of this is that you can't orphen the Child table records. They must be deleted before the parent table record can be deleted. Hope that helps. Ben