views:

60

answers:

2

Right now, to see the code of an existent stored procedure I have to RightClick -> Modify it, is there a way for me to just see the code?

+4  A: 

try running this:

exec sp_helptext 'YourProcedureName'
KM
+2  A: 

If you want to get it as a single string, use this:

SELECT definition 
FROM Sys.sql_modules 
WHERE object_id = OBJECT_ID('your procedure name here')

Marc

marc_s