Answer the question
In order to leave comments, you need to log in
How to return one deleted row to the table in a trigger?
let's say you can delete any rows from the table, except for some specific one with the value of the key field = 1,
if you do a BEFORE trigger FOR EACH ROW, then you just check the value of the key field against the OLD table, and if = 1, then just do nothing, so ?
and if by means of AFTER?
then how is it, if the row has already been deleted (you can also check through OLD or through the table itself) - then you can only roll back the entire transaction? that is, return other rows that have a field != 1?
Here it is impossible to return only that at which = 1?
or it is possible, but only through an insertion (INSERT through OLD) of this line back to the table simply?
Answer the question
In order to leave comments, you need to log in
Again engaged in the removal of tonsils through the ass?
if you do a BEFORE trigger FOR EACH ROW, then it's just to check the value of the key field against the OLD table, and if = 1, then just do nothing, right?
and if by means of AFTER?
or it is possible, but only through an insertion (INSERT through OLD) of this line back to the table simply?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question