This shows you the differences between two versions of the page.
return [2015/09/23 20:27] |
return [2015/09/23 20:27] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== RETURN Statement - PL/HQL Reference ====== | ||
+ | RETURN statement is used to return from a routine. | ||
+ | |||
+ | **Syntax:** | ||
+ | |||
+ | <code language=sql> | ||
+ | RETURN [expr]; | ||
+ | </code> | ||
+ | |||
+ | **Parameters:** | ||
+ | |||
+ | | **Parameter** | **Type** | **Value** | **Description** | | ||
+ | | expr | INT | Variable or expression | Return value | | ||
+ | |||
+ | **Notes**: | ||
+ | |||
+ | * If the return value is not specified, 0 is returned | ||
+ | |||
+ | **Examples:** | ||
+ | |||
+ | <code language=sql> | ||
+ | RETURN; | ||
+ | </code> | ||
+ | |||
+ | Return the result of an expression: | ||
+ | |||
+ | <code language=sql> | ||
+ | RETURN NVL(v1, 1); | ||
+ | </code> | ||
+ | |||
+ | |||
+ | **Compatibility:** Oracle, IBM DB2, SQL Server, Teradata, PostgreSQL, MySQL, Netezza. | ||
+ | |||
+ | **Version:** PL/HQL 0.01 |