Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle sql for each row

BEGIN
  FOR r_product IN (
        SELECT 
            product_name, list_price 
        FROM 
            products
        ORDER BY list_price DESC
    )
  LOOP
     dbms_output.put_line( r_product.product_name ||
        ': $' || 
        r_product.list_price );
  END LOOP;
END;
Comment

oracle sql for each row

DECLARE
  CURSOR c_product
  IS
    SELECT 
        product_name, list_price
    FROM 
        products 
    ORDER BY 
        list_price DESC;
BEGIN
  FOR r_product IN c_product
  LOOP
    dbms_output.put_line( r_product.product_name || ': $' ||  r_product.list_price );
  END LOOP;
END;
Comment

PREVIOUS NEXT
Code Example
Sql :: query to find second highest salary 
Sql :: sql string function update replace 
Sql :: oracle select invalid views 
Sql :: oracle parameter 
Sql :: postgres describe table 
Sql :: oracle right characters 
Sql :: import mysql dump database command line linux 
Sql :: get duplicate entry sql 
Sql :: for select oracle 
Sql :: calculate date and convert to yearsmysql 
Sql :: checking data type in sql server 
Sql :: auto increment in postgresql 
Sql :: truncate your answer to decimal places mysql 
Sql :: oracle generate list of dates in between a date range 
Sql :: mysql get max value and id 
Sql :: how to export/import a mysql database via ssh 
Sql :: sqlite copy table to another table 
Sql :: mysqli inner join (php) 
Sql :: postgresql create table as select 
Sql :: sql get month and year from date 
Sql :: insert in sql 
Sql :: FIND LOWEST SALARY EARNER IN SQL 
Sql :: php insert null mysql 
Sql :: export mysql table to file 
Sql :: how to relationship query two different tables in MySQL 
Sql :: copy table in sql 
Sql :: if else sql 
Sql :: while in sql server 
Sql :: get only one row in mysql 
Sql :: not keyword in sql 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =