NexusDB V3 Manual
RETURN statement
|

|
NexusDB Manual V3 > SQL Reference > SQL Statements > Control Statements
|
Return a function result.
Syntax
<return statement> ::= RETURN <return value>
<return value> ::=
Usage
The RETURN statement is used to assign the return value of a user-defined function.
Notes
§
|
The RETURN statement can only appear in the routine body of a function definition.
|
§
|
The return value shall be compatible with the type specified in the RETURNS clause of the function definition.
|
Examples
1)
|
The following example returns a character string value:
|
RETURN 'Hello World';
2)
|
The following example returns the system date and time:
|
RETURN CURRENT_TIMESTAMP;
3)
|
The following example returns a cursor derived from the students table:
|
RETURN SELECT * FROM students;
Conformance
SQL:2003 standard
NexusDB extension
|
-
-
|
Core SQL
Cursor specification as return value
|
|
© Nexus Database Systems Pty Ltd.
