trigger after delete
-
hi every body I have a table called "fields" i want to make a trigger that work after any deletion from "fields" table then insert the deleted row into another table called "fields_history" ! Assume that both tables have the same schema. thanks in advance. Kind Regards.
haitham
-
hi every body I have a table called "fields" i want to make a trigger that work after any deletion from "fields" table then insert the deleted row into another table called "fields_history" ! Assume that both tables have the same schema. thanks in advance. Kind Regards.
haitham
-
What is your question? You want to write a delete trigger but don't know how? Have you tried reading the documentation[^]?
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
thanks for ur attention i know the syntax of how to write a trigger but i want to take the row that is deleted from the first table and insert that row in the second table thank you in advance.
haitham
-
thanks for ur attention i know the syntax of how to write a trigger but i want to take the row that is deleted from the first table and insert that row in the second table thank you in advance.
haitham
The logical table
deleted
contains the data for the row(s) you are deleting. Write anINSERT INTO
query that takes the rows in this table and inserts them into your history table.Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
-
The logical table
deleted
contains the data for the row(s) you are deleting. Write anINSERT INTO
query that takes the rows in this table and inserts them into your history table.Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
thank you very much for this help
haitham