岈昢岆Oracle 9i笢輛俴杅擂踱紱釬腔價掛等弇ㄛ婓PL/SQL最唗笢ㄛ褫眕妏蚚3跺岈昢揭燴諷秶韜鍔﹝
commit韜鍔
commit岆岈昢枑蝠韜鍔﹝婓Oracle 9i杅擂踱笢ㄛ峈賸悵痐杅擂腔珨祡俶ㄛ婓囀湔笢蔚峈藩跺諦誧儂膘蕾馱釬⑹ㄛ諦誧儂勤杅擂踱輛俴紱釬揭燴腔岈昢飲婓馱釬⑹囀俇傖ㄛ硐衄婓怀?螘ommit韜鍔綴ㄛ馱釬⑹囀腔党蜊囀?搚瓚椅賮褊?擂踱奻ㄛ備峈昜燴迡?諴盈瑵钂奿埜?痐婓?扂漟醴芼宏?羶衄昜燴枑蝠党蜊眕ヶㄛ梗腔諦誧儂黍?△贍鯦京?擂踱笢腔杅擂岆俇淕腔﹜珨祡腔ㄛ?褉?9.26垀尨﹝
婓▽SQLPlus Worksheet▼笢褫眕硒俴狟蹈PL/SQL最唗湖羲赻雄枑蝠髡夔﹝涴欴藩棒硒俴PL/SQL最唗飲頗赻雄輛俴岈昢枑蝠﹝硒俴賦彆?褉?9.27垀尨﹝
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
set auto on;
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
▽饜杶最唗弇离▼ㄩ菴9梒\setautocommiton.sql﹝
眈茼腔ㄛ?+?赻雄枑蝠髡夔腔PL/SQL最唗?覤癒?
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
set auto off;
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
▽饜杶最唗弇离▼ㄩ菴9梒\setautocommitoff.sql﹝
rollback韜鍔
ollback岆岈昢隙幗韜鍔ㄛ婓奾帤枑蝠commit韜鍔眳ヶㄛ?蝜?楷珋delete﹜insert睿update脹紱釬剒猁閥葩腔趕ㄛ褫眕妏蚚rollback韜鍔隙幗善奻棒commit奀腔袨怓﹝
狟醱眕delete韜鍔峈瞰栳尨?蝥弇媢騿?
ㄗ1ㄘ忑珂壽敕赻雄枑蝠髡夔﹝
ㄗ2ㄘ婓▽SQLPlus Worksheet▼笢硒俴狟蹈SQL最唗ㄛ脤艘scott.emp杅擂桶笢腔垀衄杅擂ㄛ硒俴賦彆?褉?9.28垀尨﹝
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
select * from scott.emp;
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
▽饜杶最唗弇离▼ㄩ菴9梒\selectemp.sql﹝
ㄗ3ㄘ婓▽SQLPlus Worksheet▼笢硒俴狟蹈SQL最唗ㄛ刉壺scott.emp杅擂桶笢腔垀衄杅擂﹝硒俴賦彆?褉?9.29垀尨﹝
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
delete from scott.emp;
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
▽饜杶最唗弇离▼ㄩ菴9梒\deleteemp.sql﹝
ㄗ4ㄘ婓▽SQLPlus Worksheet▼笢硒俴狟蹈SQL最唗ㄛ脤戙刉壺杅擂桶scott.emp綴腔賦彆﹝硒俴賦彆?褉?9.30垀尨﹝
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
select * from scott.emp;
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
▽饜杶最唗弇离▼ㄩ菴9梒\selectemp.sql﹝
ㄗ5ㄘ婓▽SQLPlus Worksheet▼笢硒俴眕狟SQL最唗ㄛ俇傖岈昢腔隙幗﹝硒俴賦彆?褉?9.31垀尨﹝
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
rollback;
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
▽饜杶最唗弇离▼ㄩ菴9梒\rollbackemp.sql﹝
ㄗ5ㄘ婓▽SQLPlus Worksheet▼笢硒俴selectemp.sql恅璃ㄛ硒俴賦彆?褉?9.28垀尨ㄛ桶隴傖髡隙幗賸岈昢﹝
savepoint韜鍔
savepoint岆悵湔萸韜鍔﹝岈昢籵都蚕杅沭韜鍔郪傖ㄛ褫眕蔚藩跺岈昢赫煦傖?蘢伓鶷蕙祧靇訇ㄣ璉盈瑵驨艘怷奿堇媢鶱蕈鰡ㄣ瘚聜炮瓛跼婸媢龒?跺岈昢﹝逄楊跡宒?覤癒?
斐膘悵湔萸ㄩsavepoint 悵湔萸靡;
隙幗悵湔萸ㄩrollback to 悵湔萸靡;
狟醱賡庄?蝥恀墓簽ㄣ瘚耤?
ㄗ1ㄘ婓▽SQLPlus Worksheet▼笢硒俴眕狟SQL最唗ㄛ最唗俇傖砃scott.emp杅擂桶笢脣?遻鉻齞Ъ慼?硒俴賦彆?褉?9.32垀尨﹝
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
insert into scott.emp(empno,ename,sal) values(9000,wang,2500);
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
▽饜杶最唗弇离▼ㄩ菴9梒\insertemp.sql﹝
ㄗ2ㄘ婓▽SQLPlus Worksheet▼笢硒俴狟蹈SQL測鎢ㄛ俇傖斐膘悵湔萸腔紱釬﹝硒俴賦彆?褉?9.33垀尨﹝
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
savepoint insertpoint;
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
▽饜杶最唗弇离▼ㄩ菴9梒\ createsavepoint.sql﹝
ㄗ3ㄘ婓▽SQLPlus Worksheet▼笢褫眕硒俴む坻腔SQL逄曆﹝
ㄗ4ㄘ婓▽SQLPlus Worksheet▼笢硒俴狟蹈SQL測鎢ㄛ最唗俇傖隙幗善硌隅腔悵湔萸※insertpoint§﹝硒俴賦彆?褉?9.34垀尨﹝
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
rollback to insertpoint;
求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求求
▽饜杶最唗弇离▼ㄩ菴9梒\ rollbacksavepoint.sql﹝
ㄗ5ㄘ褫眕硒俴selectemp.sql恅璃ㄛ脤戙隙幗ヶ綴腔杅擂﹝