---------------Transaction---The transaction is complete when it is run to commit, otherwise the rollback operation is run.Declarev_money acount.money%type:=1223;ex exception;begin update acount set Money=money-v_money where id=1; Raise ex; Update acount set Money=money+v_money where id=2; commit; Exception when others and then dbms_output. Put_Line (' power Down '); Rollback;end;
the task of a transaction is to transform a database from a state into a state that is different from the file system. It is used by the database. It has four properties:TOMsummarized asACIDthat
Atomic Natureatomicity:statement-level atomicity. Process-level atomicity, transactional-level atomicity
ConsistencyConsistency:consistent state. There are no two states in the same transaction
Isolation ofIsolation:the separation between transactions is mutually exclusive.(There may also be autonomous matters here)
DurabilityDurability:The transaction commits, then the state is permanent.
Snail-oracle Basic Business Learning (v)