Don’t Forget OBJECTPROPERTY

While reading another blog post this morning I was reminded of the super helpful metadata function that is OBJECTPROPERTY.  I often have to stop and remind myself that while all the information raised by OBJECTPROPERTY is available directly through the catalog views it is in many cases simpler to deal directly with the function.  For example, solving the blogger’s original question of objects without indexes can be accomplished in a simple query:

image

We can extend our search to find all objects without an index, views and tables alike.

image
There is a wealth of information available to you via OBJECTPROPERTY.  What metadata queries could you simplify today?


Posted by: whitneyw
Posted on: 8/10/2010 at 11:15 AM
Tags: , ,
Categories: SQL Server | Transact SQL
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed
Comments are closed