How to delete a row ONLY in parent table, which is referenced by a Foregin Key from the child table
问题 I want to delete a row/tuple from a parent table, but it is throwing an error message because it has a FOREIGN KEY reference in its child table. However, in my case I want to delete the record only from the parent table and maintain the data in the child table . Is it possible to achieve this? I know the usage of ON DELETE CASCADE, but I want to know if there is a solution for the secenario I described? 回答1: It is possible with some agreements in your data. To maintain child table data you'll