Pages

Social Icons

Monday, 27 January 2014

Definition and information of sql object

Hi,

Below are the three ways by which we can get the definition and information of sql object like view, procedure or function

SELECT definition, uses_ansi_nulls, uses_quoted_identifier, is_schema_bound
FROM sys.sql_modules
WHERE object_id = OBJECT_ID('<storedProcedure_Name>');

SELECT OBJECT_DEFINITION (OBJECT_ID('<storedProcedure_Name>')) AS ObjectDefinition;

EXEC sp_helptext '<storedProcedure_Name>'

Thanks,
RS

No comments:

Post a Comment