Sql, Sql Server, Postgres, Postgresql, Database.
volume DESC; OPEN stock_cursor; -- don't forget to open for SQL Server -- Fetch first row before iterating FETCH NEXT FROM stock_cursor INTO @Symbol, @Volume; WHILE @@FETCH_STATUS = 0 BEGIN -- print to see the output PRINT @Symbol + ' - ' + CAST(@Volume AS VARCHAR); -- fetch the following row FETCH