select * from (EXEC sp_SomeStoredProc)
If you can't do this then what is stopping it from being added to the SQL standard or T-SQL?
You can't do this, however you can do it as an insert. e.g.
insert mytable
exec myStoredProcedure
Also, never name your stored procedures sp_xxxx. This is because SQL will always search in the system stored procedure area due to the sp_ before looking in the user stored procedures, leading to a small loss in performance that could add it to be fairly significant on a process that is run frequently.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With