SQL Server assigns the term "object" to a number of items. These could be tables, views, columns, parameters, stored procedures, et cetera. The following query can be used to identify the type of a SQL Server database object.
NOTE: The type is identified in the "type_desc" column.
NOTE: Set the value in the DECLARE line at the top to the object name to look for (partial strings are fine).
NOTE: The type is identified in the "type_desc" column.
NOTE: Set the value in the DECLARE line at the top to the object name to look for (partial strings are fine).
DECLARE @search VARCHAR(MAX) = 'OBJECTNAME'
SELECT *
FROM sys.all_objects
WHERE name LIKE '%' + @search + '%'
Comments
Post a Comment