If you’ve used T-SQL for a while, it’s likely you’ve encountered the sys.objects
system catalog view, which returns user-defined, schema-scoped objects in the database.
But there are two other similar views that you may or may not be aware of; sys.system_objects
and sys.all_objects
.