I have several nested procedures. A temp table is being created in the 1st one and later used at several places. Currently I have created a index on the temp table, but need to verify as I am still seeing it to run for long time.
I tried to replicate my problem following stored proc
create proc ProcSp
as
sp_help #tmpCheck
go
END
go
I get error "Incorrect Syntax near sp_help".
Please let me know how would we be able to call sp_help on a temp table inside a proc?
Edit
Is there any way to just display indexes on any table inside a proc?
sp_help is a stored procedure so like all stored procs in needs to be called via exec
However in this case if you want to confirm the index has been created then it is better to check it when the index is created. Do this by looking at the
@@errorvariable just after you create the index, if it is zero then the index is correcte.g.