In SQL Server, you might’ve encountered the OBJECTPROPERTY()
function, only to find out that there’s also a OBJECTPROPERTYEX()
function that appears to do exactly the same thing.
What’s going on here? Why the need for two functions that do the same thing?
My understanding is that Microsoft chose to add OBJECTPROPERTYEX()
to extend the functionality of OBJECTPROPERTY()
, rather than to introduce changes to OBJECTPROPERTY()
that would potentially break existing code on legacy systems.
So there are some differences between the two functions.