Quantcast
Channel: Answers for "Delete error"
Viewing all articles
Browse latest Browse all 4

Answer by Håkan Winther

$
0
0
Fatherjack is right, but you have a second option. You can alter your foreign key to use cascade delete. That is, you can delete records from the primary table and all corresponding records from the related table will be deleted. It will make it easier to delete records from a table with foreign keys, but it is usually not recommended for a couple of reasons: - You have no control over the delete process. Deleting one record from primary table can cause a delete of millions of records from related table. - If you accidentially delete a record, you will not get an error and all corresponding records will also be deleted. If I spend a little more time, I can probably remember some additional reasons to avoid cascading delets, but time is a bottleneck... :)

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images