INFORMATION_SCHEMA 与 sysobjects [英] INFORMATION_SCHEMA vs sysobjects
问题描述
在 SQL Server 中:
In SQL Server:
INFORMATION_SCHEMA 和 sysobjects 有什么区别?一个比另一个提供更多的信息还是它们通常用于不同的事情?
What is the difference between INFORMATION_SCHEMA and sysobjects? Does one provide more information than the other or are they used for different things usually?
sysobjects 和 sys.objects 一样吗?如果不是,它们之间有什么区别?
Is sysobjects the same as sys.objects? If not, what is the difference between these?
推荐答案
INFORMATION_SCHEMA 是 SQL-92 标准的一部分,因此它不太可能像 sysobjects 那样经常更改.
The INFORMATION_SCHEMA is part of the SQL-92 standard, so it's not likely to change nearly as often as sysobjects.
这些视图提供 SQL Server 元数据的内部、独立于系统表的视图.即使对基础系统表进行了重大更改,它们也能正常工作.
The views provide an internal, system table-independent view of the SQL Server metadata. They work correctly even if significant changes have been made to the underlying system tables.
查询 INFORMATION_SCHEMA 总是更好,因为它隐藏了 sysobjects 中对象的实现细节.
You are always much better off querying INFORMATION_SCHEMA, because it hides the implementation details of the objects in sysobjects.
这篇关于INFORMATION_SCHEMA 与 sysobjects的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!