DECLARE @AccountID INTDECLARE @getAccountID CURSOR SET @getAccountID = CURSOR FORSELECT Account_ID FROM AccountsOPEN @getAccountID FETCH NEXT FROM @getAccountID INTO @AccountIDWHILE @@FETCH_STATUS = 0 BEGIN PRINT @AccountID FETCH NEXT FROM @getAccountID INTO @AccountID END CLOSE @getAccountID DEALLOCATE @getAccountID