oracle sql for each row

Solutions on MaxInterview for oracle sql for each row by the best coders in the world

showing results for - "oracle sql for each row"
Clara
15 Jan 2021
1DECLARE
2  CURSOR c_product
3  IS
4    SELECT 
5        product_name, list_price
6    FROM 
7        products 
8    ORDER BY 
9        list_price DESC;
10BEGIN
11  FOR r_product IN c_product
12  LOOP
13    dbms_output.put_line( r_product.product_name || ': $' ||  r_product.list_price );
14  END LOOP;
15END;
Giuseppe
18 Mar 2017
1BEGIN
2  FOR r_product IN (
3        SELECT 
4            product_name, list_price 
5        FROM 
6            products
7        ORDER BY list_price DESC
8    )
9  LOOP
10     dbms_output.put_line( r_product.product_name ||
11        ': $' || 
12        r_product.list_price );
13  END LOOP;
14END;