Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

PL/SQL Stored Function !

$
0
0
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

Code:

create or replace function age (dateOfBirth date)
return number
is

  mAge number(5.2);
 
  begin
      mAge:=(sysdate-dateOfBirth)/365.25;
          return mAge;
  end;


Viewing all articles
Browse latest Browse all 13329

Trending Articles