CREATE FUNCTION Statement (Java UDF)

Creates a new external Java table UDF function in the database.

Syntax

CREATE [ OR REPLACE | TEMPORARY ] FUNCTIONowner.]function-name  ( [ parameter, … ] )
 RETURNS data-type routine-characteristics
 SQL SECURITYINVOKER | DEFINER } ]
 { compound-statement
  AS tsql-compound-statementEXTERNAL NAME 'java-call' LANGUAGE JAVA }

Parameters

Examples

Usage

LONG BINARY and LONG VARCHAR are not permitted as return-value data types.

EXTERNAL NAME LANGUAGE JAVA—A function that uses EXTERNAL NAME with a LANGUAGE JAVA clause is a wrapper around a Java method.

iq-environment-name: JAVA [ ALLOW | DISALLOW SERVER SIDE REQUESTS ]:

DISALLOW is the default.

ALLOW indicates that server-side connections are allowed.

Note: Do not specify ALLOW unless necessary. A setting of ALLOW slows down certain types of Sybase IQ table joins.

Do not use UDFs with both ALLOW SERVER SIDE REQUESTS and DISALLOW SERVER SIDE REQUESTS in the same query.

Standards

  • SQL—ISO/ANSI SQL compliant.

  • Sybase—Not supported by Adaptive Server Enterprise.

Permissions

Must have RESOURCE authority.

External Java functions must have DBA authority.