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;
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;