How to display a stored procedure in SQL?

K

Komika

Display Stored Procedure in SQL

According to "StackOverflow", you can display a stored procedure by using multiple queries in SQL which are listed below:

Query 1

SELECT object_definition(object_id)

FROM sys.objects 

WHERE type='p' and name='yourStoredProcedureName'

Query 2

SELECT definition 

FROM sys.sql_modules 

WHERE object_id = OBJECT_ID('yourSchemaName.yourStoredProcedureName')

Query 3

SELECT OBJECT_DEFINITION (OBJECT_ID(N'yourStoredProcedureName'))

1 votes

Your Answer

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)