I am doing an after insert trigger on a table where I delete the rows that are incorrect, however, I am unable to do this and I can't find the correct syntax anywhere.
From what I understand, the table where the rows will be deleted from is in the FROM
clause but I also need to use the inserted table. How do I do this? I know this can be solved using an instead of insert trigger but I really want to know how to do this way.
DELETE
FROM promotion p, inserted i
WHERE <conditions>
1条答案
按热度按时间ars1skjm1#
You can try like this: