sql-server – 更新用户取消的查询

我有一个有数百万行的表.

无意中我在没有where子句的表上写了一个更新查询,然后单击执行.

它开始执行.两秒钟后,我意识到查询错误,我点击了Sql Server Management Studio中的“停止”按钮.查询执行已停止,这一切都在7秒内发生.

现在我很想知道是否有任何行受到影响.如果有的话呢?
怎么找到它?

解决方法

单个更新语句不会更新某些行.这是所有行或没有

这是SQL Server尊重的ACID属性中的atomicity.

Atomicity requires that each transaction is “all or nothing”: if one part of the transaction fails,the entire transaction fails,and the database state is left unchanged. An atomic system must guarantee atomicity in each and every situation,including power failures,errors,and crashes.

然后提交在语句的末尾,所以当你取消时,没有提交

dawei

【声明】:淮南站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。