Skip to main content
3 of 5
added 211 characters in body
Evan Carroll
  • 64.7k
  • 49
  • 251
  • 496

What is the difference between sys.objects and sys.system_objects?

In this question I was writing a query using sys.sysobjects. However, one of the answers mentioned sys.system_objects. I'm just wondering what is the difference between the two tables?

  • sys.sysobjects
  • sys.system_objects

sysobjects has more things.

> SELECT count(*) FROM sysobjects;
2312

> SELECT count(*) FROM sys.system_objects;
2201

SELECT count(*)
FROM sys.sysobjects
WHERE NOT EXISTS (
  SELECT 1
  FROM sys.system_objects
  WHERE system_objects.object_id = sysobjects.id
);
> 111
Evan Carroll
  • 64.7k
  • 49
  • 251
  • 496