User Tools

Site Tools


Sidebar

**HPL/SQL is included to Apache Hive since version 2.0** * [[home|Home]]\\ * [[why|Why HPL/SQL]]\\ * [[features|Key Features]]\\ * [[start|Get Started]]\\ * [[doc|HPL/SQL Reference]]\\ * [[download|Download]]\\ * [[new|What's New]]\\ * [[about|About]]

call

====== CALL Statement - PL/HQL ====== CALL statement allows you to execute a stored procedure. **Syntax**: <code language=sql> CALL procedure_name [(parameter, ...)]; </code> **Example**: Define a procedure and then call passing a parameter: <code language=sql> CREATE PROCEDURE set_message(IN name STRING, OUT result STRING) BEGIN SET result = 'Hello, ' || name || '!'; END; -- Now call the procedure and print the results DECLARE str STRING; CALL set_message('world', str); PRINT str; Result: -- Hello, world! </code> **Compatibility:** Teradata, IBM DB2 and MySQL **Version**: PL/HQL 0.3.1 See also: * [[udf-sproc|User-Defined Functions and Stored Procedures]] * [[create-function|CREATE FUNCTION]] * [[create-procedure|CREATE PROCEDURE]] * [[include|INCLUDE]]