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, ∼2080🔥, 0💬
Popular Posts:
How to generate email addresses? To help you to obtain some email addresses for testing purpose, FYI...
How to set Content-Type to application/json? The server requires the Content-Type to be application/...
Where to find tutorials on Test Management? I want to know how to manage software testing documents ...
How to Override a JMeter Variable from Command Line? I want to run the same test plan multiple times...
How to validate domain name format? In order to help your programming or testing tasks, FYIcenter.co...