hello
I have a table that currently has a trigger on it.
Code:
CREATE trigger update_host
BEFORE UPDATE ON host FOR EACH row
EXECUTE PROCEDURE host_hist_ins;
What I want to happen is this:
When the trigger goes off, it takes the current record that is being updated from the
host table, and insert it into the
host_hist table.
The problem I am having is how do I write it so it is parsing the value of the ID (Primary key) into the code ?
Code:
...
DECLARE
cursor a_cur IS SELECT host_id FROM host where id = [this is the variable I want from the update]
BEGIN
...
Hopefully that makes sense
thanks