TOP CATEGORIES

×

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: advertise@gdatamart.com

Donate: To Support US

© 2024 GDATAMART.COM (All Rights Reserved)