Previous
Previous
 
Next
Next

Creating a Function

To create a function:

  1. On the Workspace home page, click SQL Workshop and then Object Browser.

    Object Browser appears.

  2. Click Create.

  3. From the list of object types, select Functions.

  4. Enter a function name, specify the return datatype, and click Next.

  5. Define the arguments and click Next (optional):

    • Argument Name

    • Argument Type (datatype)

    • Default (value)

    To add additional arguments, click Add Argument.

  6. Enter P/LSQL block you want to use as the function body and click Next.

    To link to SQL Commands, click Command Processor. To view the previously defined arguments, click Defined Arguments.

    A confirmation page appears. To view the SQL used to create the function, click Show SQL.

  7. Click Finish.