In oracle I can do as follows:
OPEN MY_CURSOR FOR 'SELECT * FROM MY_TABLE'
How to get this result in SqlSever? I want to return a cursor by mounting a dynamic sql in the procedure. I'm currently using it like this:
CREATE PROCEDURE MY_PROC(@PARAM INT)
AS
SELECT * FROM MY_TABLE