I have a table with with an object id column and a type column.
I want to be able to be able to have ON DELETE CASCADE fk to reference different tables depending on the type.
Is this possible?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you can use a trigger on the table where the data you want to check to accomplish the deletion “ON CASCADE” and make the deletion there, otherwise is not possible to have the
ON CASCADEwith a condition.