SQL Server 回滚事务
ROLLBACK 命令会删除事务期间创建的临时表吗?
谢谢
Will the ROLLBACK
command drop a temporary table which is created during the transaction ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,它还会回滚在删除该临时表之前已在该临时表上完成的所有工作。您可以通过在创建事务之前创建临时表或使用不受事务影响的表变量来防止这种情况。
Yes, it will also roll back all work that has been done on that temp table before it is dropped. You can prevent this by creating the temp table before the transaction is created, or use a table variable which is not affected by the transaction.