Update a table with the sql string
Hi...
I have a table named Employee (with columns ID, Name, Surname) and another table named Employee_UPDATE (with columns ID, Sql_String).
I need a trigger(s). If I make an insert, update or delete on Employee, trigger should add the Sql string of the command into the Employee_Update table.
For example,
If a insert an item in Employee like ;
500, Bill, Nash
Trigger must add the below string to the Employee_UPDATE
INSERT INTO Employee_UPDATE (Sql_String)
VALUES ('INSERT INTO Employee (ID. Name. Surname)
VALUES (500, Bill. John)'
)
I want to make such a things.
How can I do that?
Thanks for help...
|