是TRUNCATE表回滚了吗? [英] Is TRUNCATE table is rolled back?

查看:312
本文介绍了是TRUNCATE表回滚了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi ..

hi..
Is TRUNCATE table is rolled back?

推荐答案

可以-如果在事务中使用它,可以.这里有一个讨论: http://www .sql-server-performance.com/forum/threads/how-to-rollback-truncate-operation.16968/ [
You can - if you use it in a Transaction. There is a discussion of it here: http://www.sql-server-performance.com/forum/threads/how-to-rollback-truncate-operation.16968/[^]


您好,
您不能回滚TRUNCATE TABLE语句,也不能使用FLASHBACK TABLE语句来检索已被截断的表的内容.
截断表讨论 [
Hi,
You cannot roll back a TRUNCATE TABLE statement, nor can you use a FLASHBACK TABLE statement to retrieve the contents of a table that has been truncated.
Truncate Table Discussion[^]


此处是对此的讨论

如果在代码中使用TRANSACTIONS,则可以回滚TRUNCATE.如果没有使用任何事务,并且执行了TRUNCATE操作,则无法从日志文件中检索该事务. TRUNCATE是DDL操作,它未记录在日志文件中.
http://blog.sqlauthority.com/2010/03 /04/sql-server-rollback-truncate-command-in-transaction/ [
Here is a discussion about this

If you use TRANSACTIONS in your code, TRUNCATE can be rolled back. If there is no transaction is used and TRUNCATE operation is committed, it can not be retrieved from log file. TRUNCATE is DDL operation and it is not logged in log file.
http://blog.sqlauthority.com/2010/03/04/sql-server-rollback-truncate-command-in-transaction/[^]


这篇关于是TRUNCATE表回滚了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆