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>
INSERTEDis not MySql syntax, have you TAGGED correctly?p. Check example D in the docs