按数据库过滤 SQL Server sys.objects
应该很容易,但我无法得到它。
我想按数据库(名称或 ID)过滤 sys.objects 结果。我以为我必须加入 sys.databases,但似乎不可能。我查阅了 SQL Server 文档,但没有找到任何有帮助的内容。
我缺少什么?
Should be easy, but I can't get it.
I want to filter the sys.objects results by database (either name or id). I thought I had to join with sys.databases, but does not seem to be possible. I went to SQL Servers docs but did not find anything that could help.
What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每个数据库都有自己的sys.objects,因此您必须从sys.databases中获取数据库,而
{dbname}是sys.databases中的
名称
Each Database have its own sys.objects, so you have to get the databases from sys.databases, and
{dbname} is the
name
from sys.databases