基于DB状态的条件查询
取决于数据库状态的条件查询的语法是什么?基本上相当于这个伪代码?
IF [My database is in RECOVERY mode]
[DO SOME STUFF]
ELSE
[DO SOME OTHER STUFF]
感谢您提供的任何帮助!
What would the syntax of a conditional query that depends on the db status be? Basically, the equivalent of this pseudo-code?
IF [My database is in RECOVERY mode]
[DO SOME STUFF]
ELSE
[DO SOME OTHER STUFF]
Thanks for any help you can provide!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
<罢工>
IF DATABASEPROPERTY('DBName','IsInRecovery') = 1
编辑:虽然不推荐使用
IF DATABASEPROPERTY('DBName','IsInRecovery') = 1
Edit: Although that is deprecated use