- 1、本文档共50页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Committing Changes (continued) The slide example deletes a row from the EMPLOYEES table and inserts a new row into the DEPARTMENTS table. It then makes the change permanent by issuing the COMMIT statement. Example Remove departments 290 and 300 in the DEPARTMENTS table, and update a row in the COPY_EMP table. Make the data change permanent. DELETE FROM departments WHERE department_id IN (290, 300); 2 rows deleted. UPDATE copy_emp SET department_id = 80 WHERE employee_id = 206; 1 row updated. COMMIT; Commit Complete. Instructor Note Use this example to explain how COMMIT ensures that two related operations occur together or not at all. In this case, COMMIT prevents empty departments from being created. Rolling Back Changes Discard all pending changes by using the ROLLBACK statement. Following a ROLLBACK statement: Data changes are undone. The previous state of the data is restored. The locks on the affected rows are released. Example While attempting to remove a record from the TEST table, you can accidentally empty the table. You can correct the mistake, reissue the proper statement, and make the data change permanent. DELETE FROM test; 25,000 rows deleted. ROLLBACK; Rollback complete. DELETE FROM test WHERE id = 100; 1 row deleted. SELECT * FROM test WHERE id = 100; No rows selected. COMMIT; Commit complete. Statement-Level Rollbacks Part of a transaction can be discarded by an implicit rollback if a statement execution error is detected. If a single DML statement fails during execution of a transaction, its effect is undone by a statement-level rollback, but the changes made by the previous DML statements in the transaction are not discarded. They can be committed or rolled back explicitly by the user. Oracle issues an implicit commit before and after any data definition language (DDL) statement. So, even if your DDL statement does not execute successfully, you
您可能关注的文档
- Office2003快速培训教程344的.ppt
- ok荷载、地基处理与基础工程.ppt
- OptiXNG-SDH系列设备组网.ppt
- oracle11G第1章安装与卸载.ppt
- oracle11G第2章体系结构.ppt
- Oracle11g第11讲备份与恢复.ppt
- OracleEBS审计电子数据采集.ppt
- OS02经典进程同步问题2014-2015-2.ppt
- OS2013_UNIT8文件与文件系统.ppt
- OS2013_UNIT9文件系统的实现.ppt
- 25上半年2期套题班-行政职业能力测验(八).docx
- 公考讲义-2025年1月时政汇总.pdf
- 2025年省考逻辑填空1000 高频实词积累+刷题早读课 讲义.pdf
- 25上半年2期套题班-行政职业能力测验(九).docx
- 2025四川事业编FB综合岗考试-综合能力测试讲义-主观题基础,案例分析题,公文写作及文章写作题.pdf
- 25上半年2期套题班-行政职业能力测验(五).docx
- 2025申论多省联考刷题课真题资料-2025国考执法课程.doc
- 2025申论多省联考刷题课真题资料-2024江西执法课程.doc
- 25上半年2期套题班-行政职业能力测验(十).docx
- 2025申论多省联考刷题课真题资料-2024福建县乡课程.doc
最近下载
- 全国计算机等级考试教程:二级C语言程序设计.docx VIP
- 大学生毕业论文写作教程(本科)全套教学课件.pptx
- 三年级道德与法治下册-《我能变得更好》-课件.pptx
- 新人教版一年级下册数学(全册)同步随堂练习一课一练.pdf VIP
- 【地理】亚洲自然环境第2课时课件-2024-2025学年七年级地理下学期(人教版2024).pptx VIP
- 钢吊车梁SG520-1标准图集.pdf
- 中国糖尿病防治指南(2024版)解读-共病管理.pptx VIP
- wright osteoset rbk miig生物材料产品介绍.pdf VIP
- 计算机专业英语教程课完整版.pptx VIP
- 最新粤教版八年级音乐下册(粤教花城版)电子课本课件【全册】.pptx
文档评论(0)