Hi,

I am writing some triggers for my project.
I am writing a trigger on a table after delete....I want to know how u refer
to the row that is being deleted.

For example for a trigger function after INSERT/UPDATE u refer to the row
being inserted/updated using NEW like this....

CREATE FUNCTION .....
BEGIN
        IF UPDATE(CreateTime) THEN
                SELECT INTO ValidCount COUNT(*) FROM PointTable
                WHERE NEW.PointId = PointTable.PointId;
        END IF;

        ......
        ....
END ;
' LANGUAGE 'plpgsql';

My question is how will refer to the row being deleted in the trigger
function.\
I want to do something like this

DELETE PointTable FROM PointTable 
WHERE PointTable.PointId = DELETED.PointId;

Pls help me with this.






> With Best Regards 
> Pradeep Kumar P J 
> 

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to