Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Selecting from fuction
>>
I know that on Oracle8 I can use select statement to select from objects
like functions. Can I do that on Oracle 7.3.4?
Also, could you give me a simple example of such a function?
<<
Generally, the syntax is:
SELECT function_name (parameter1, parameter2...) FROM DUAL;
You select the function from DUAL and pass it parameters. For example, here is the usage syntax for a function I created that returns the number of business days between two dates:
SELECT num_business_days ( '01-FEB-99' , '15-FEB-99' ) FROM DUAL;
Or, you can use a built-in function, like sysdate (which takes no parameters):
SELECT sysdate FROM DUAL; Received on Thu Sep 30 1999 - 11:46:47 CDT
![]() |
![]() |