Test method:
Create the original table and insert data:
Create? Table? Testing?
(id? int,
Name? varchar 2( 10));
Insert? Become? Testing? Values? (1,' Zhang San');
Insert? Become? Testing? Values? (2)' Li Si';
Submit; Create a log table:
Create? Table? Test log
(id? int,
Name? varchar2( 10),
Date of deletion? Date); Create a trigger:
Create? Or? Replace? Trigger? Test _ Delete _ Test
Before? Delete? Open? test
For what? Every one? row
begin
Insert? Become? Test log (id, name, deletion date)
Values (? :old.id,? :old.name,? sysdate);
End; To delete:
Delete? From where? Testing? Where is it? id = 2;
Submit; Test the test table and the test_log table:
Therefore, it can be proved that the deletion is successful, and the deleted data is written into the log table.
The fire is not as hot as "Britney Spears" in Chengdu, and the number of fans soared to 5 million in a very short time; Fire is not as good as "Britney Spears" fi