什么是sql中的提交和回滚示例? [英] what is commit and rollback in sql with example?
本文介绍了什么是sql中的提交和回滚示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有谁知道?
什么是sql中的提交和回滚示例?
解决方案
提交和回滚主要用于事务。
参见 SQL Server中的事务
IN SIMPLE WORDS - >
COMMIT用于永久存储您已经开始交易的任务(插入/删除/更新操作)。
ROLLBACK用于恢复自你启动ur transaction以来所做的所有任务(插入/删除/更新操作)。你的数据库状态将在你的BEGIN TRANSACTION点。
阅读本文
http:// www.tutorialspoint.com/sql/sql-transactions.htm [<啊ref =http://www.tutorialspoint.com/sql/sql-transactions.htmtarget =_ blanktitle =New Window> ^ ]
http://dev.mysql.com/doc/refman/5.0/en /commit.html [ ^ ]
http://stackoverflow.com/questions/15012886/how-to-rollback-or-commit-a-transaction-in-sql-server [ ^ ]
hi,
Can anyone know?
what is commit and rollback in sql with example?
解决方案
Commit and Rollback mainly used with transaction.
see Transactions in SQL Server
IN SIMPLE WORDS-->
COMMIT used to permanently store the task (insert/delete/update operations) you have done since u have started ur transaction.
ROLLBACK is used to revert all the task (insert/delete/update operations) you have done since u have started ur transaction.And the state of ur data base will be at the point of ur BEGIN TRANSACTION.
read this
http://www.tutorialspoint.com/sql/sql-transactions.htm[^]
http://dev.mysql.com/doc/refman/5.0/en/commit.html[^]
http://stackoverflow.com/questions/15012886/how-to-rollback-or-commit-a-transaction-in-sql-server[^]
这篇关于什么是sql中的提交和回滚示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文