Create a function named myfuncinout that returns a VARCHAR value; the function has an IN/OUT parameter named x. - Java JDBC

Java examples for JDBC:Stored Procedure

Description

Create a function named myfuncinout that returns a VARCHAR value; the function has an IN/OUT parameter named x.

try {
    function =
        "CREATE OR REPLACE FUNCTION myfuncinout(x IN OUT VARCHAR) RETURN VARCHAR IS "
        + "BEGIN "
        + "x:= x||'outvalue'; "
        + "RETURN 'a returned string'; "
        + "END;";
    stmt.executeUpdate(function);
} catch (SQLException e) {
}

Related Tutorials