alter PROCEDURE SP_CURSOR as BEGIN DECLARE @empid INT DECLARE @GETEMPID CURSOR SET @GETEMPID = CURSOR FOR SELECT empid FROM testtable OPEN @GETEMPID FETCH NEXT FROM @GETEMPID INTO @empid WHILE @@FETCH_STATUS = 0 BEGIN PRINT @empid FETCH NEXT FROM @GETEMPID INTO @empid END CLOSE @GETEMPID DEALLOCATE @GETEMPID end
sp_cursor
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)