Please consider following code:
Could you explain:
1) What does age() function doing below?
2) After running it, I'm getting out put as 1,2,3,4 and it keeps on increasing
infinitely and I had to quit SQL plus to get out of this infinite increasing sequence.
3) Is there an way to get out without quitting the SQL Plus prompt?
Thanks
Could you explain:
1) What does age() function doing below?
2) After running it, I'm getting out put as 1,2,3,4 and it keeps on increasing
infinitely and I had to quit SQL plus to get out of this infinite increasing sequence.
3) Is there an way to get out without quitting the SQL Plus prompt?
Thanks
Code:
create or replace function age (dateOfBirth date)
return number
is
mAge number(5.2);
begin
mAge:=(sysdate-dateOfBirth)/365.25;
return mAge;
end;