Oracle trigger to keep a copy of deleted records in another table

I am using this trigger to keep a copy of the deleted record from table Orders_Details in table Orders_Details_Deleted.

I am using this trigger for two reason first one is security in case the record accidentally deleted and to keep history of deleted record by user

Is there any better way ?

CREATE OR REPLACE TRIGGER TRG_Record_Deleted    BEFORE DELETE    ON Orders_Details    FOR EACH ROW BEGIN    INSERT INTO Orders_Details_Deleted       SELECT *         FROM Orders_Details        WHERE Orders_Details.Order_ID = Orders_Details.Order_ID; END; 


Category: oracle Time: 2016-07-29 Views: 0
Tags: oracle plsql

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.111 (s). 12 q(s)