忘记了 SQL 中的WITH (READUNCOMMITTED)
在我的公司中,建议我始终运行SQL查询,如下所示:
SELECT col1, col2
FROM table WITH (READUNCOMMITTED)
WHERE table.id = my_id;
这是一个由其他应用程序使用的生产数据库,我只有阅读访问权限。但是,我发出了以下查询:
SELECT col1, col2 FROM table;
由于缺少(ReadUncomment)丢失,我是否有可能通过锁定数据库来破坏数据库?我停止了查询,然后才能完成。
At my company I was advised to always run SQL queries as follows:
SELECT col1, col2
FROM table WITH (READUNCOMMITTED)
WHERE table.id = my_id;
It is a production database which is used by other applications and I only have read access. However I issued a query like the following:
SELECT col1, col2 FROM table;
Is it possible that I corrupted the database by locking parts of it due to the missing WITH (READUNCOMMITTED)? I stopped the query before it could finish.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论