Collections:
What Is OBJECT_ID()
What Is OBJECT_ID() function in SQL Server?
✍: FYIcenter.com
OBJECT_ID() is a system function in a SQL Server Database
that returns the object_id value from the sys.objects table for
a given object name.
The following query will return the same result:
SELECT OBJECT_ID('ADDRESS') AS object_id
211197
SELECT object_id FROM sys.objects WHERE name = 'ADDRESS'
211197
Using OBJECT_ID() function will help to avoid using an extra table join with the sys.objects. For example, the following query will list all columns in the table ADDRESS:
SELECT * FROM sys.columns where object_id = OBJECT_ID('ADDRESS')
⇒ What Is a SQL Server Partition
2019-07-09, 2061🔥, 0💬
Popular Posts:
How to find out my browser request headers? To help you to see your browser request headers, FYIcent...
How to perform UUDecode (Unix-to-Unix Decode)? UUEncode is Unix-to-Unix encoding used on Unix system...
What are JMeter command line options? You can get see JMeter command line options by running this co...
How to generate user birthday dates? Test user birthday dates are frequently needed in testing appli...
Where to find test data generators? FYIcenter.com has prepared a number of test data generators for ...