I have a procedure, I want to read schema of the procedure. To retrieve view schema I use the query shown here. Same way I want to get schema of stored procedure. How to get
I am not getting your question clearly I think this would work with you
Select * from sys.objects where type='p' and name = (procedure name)
Replace your query with this and it will work fine