Total Pageviews

July 1, 2016

7/01/2016 08:28:00 PM
 declare
  2      cursor c_countEmps is select count(*) count, sum(sal) sum from emp;
  3      r_testRec c_countEmps%ROWTYPE;
  4  begin
  5      open c_countEmps;
  6      fetch c_countEmps into r_testRec;
  7      close c_countEmps;
  8      DBMS_OUTPUT.put_line('number of emps is:'||r_testRec.count);
  9      DBMS_OUTPUT.put_line('sum of emp salaries is:'||r_testRec.sum);
 10  end;
 11  /
 
Related Posts Plugin for WordPress, Blogger...