Declare @ID uniqueidentifier

DECLARE cursor_name CURSOR FAST_FORWARD READ_ONLY FOR
SELECT ID FROM tableName

OPEN cursor_name
FETCH NEXT FROM cursor_name INTO @ID
WHILE (@@fetch_status <> -1)
BEGIN
    PRINT @ID
    FETCH NEXT FROM cursor_name INTO @ID
END
DEALLOCATE cursor_name