CREATE OR REPLACE FUNCTION testFunction2 RETURN INT IS
CURSOR myCursor IS SELECT sname, major FROM student;
studentName varchar (10); major varchar (10); num integer;
BEGIN
  OPEN myCursor;
  FETCH myCursor INTO studentName, major;
  num := myCursor%ROWCOUNT; -- num will take the value 1
  CLOSE myCursor;
  num := 70000 + num * 10000;
  RETURN num; -- returns 80000 
END;
.
