sp_MSget_qualified_name
The sp_MSget_qualified_name stored procedure is used to get the qualified name for the given object id.Syntaxsp_MSget_qualified_name object_id, qualified_name
where
object_id - is the object id. object_id is int.
qualified_name - is the qualified name of the object. qualified_name
is nvarchar(512).
This is the example to get the qualified name for the authors table from the pubs database.
USE pubs
GO
declare @object_id int, @qualified_name nvarchar(512)
select @object_id = object_id('authors')
EXEC sp_MSget_qualified_name @object_id, @qualified_name output
select @qualified_name
GO
Here is the result set from my machine:
--------------------------------------
[dbo].[authors]
Subscribe to:
Post Comments (Atom)
2 comments:
Nice ...
Post a Comment