Two values get passed to the function in the order in which they are presented. The function returns one value to the program.
The Function:
Create Or Replace
Function My_Speed
(My_Mileage Number
,My_Time Number
)
Return Number
Is
Begin
Return My_Mileage/My_Time;
End;
/
Calling the Function:
Begin
DBMS_Output.Put_Line ('MPH: '
|| My_Speed(&Miles,&Hours)
);
End;
/
No comments:
Post a Comment