The methods of an object-oriented language correspond to the functions of a procedural language. You can invoke methods stored in the database by referencing them, with name qualification, on instances for instance methods, and on either instances or classes for static (class) methods. You can invoke the method directly in, for example, Transact-SQL select lists and where clauses.
You can use static methods that return a value to the caller as user-defined functions (UDFs).
Certain restrictions apply when using Java methods in this way:
If the Java method accesses the database through JDBC, result-set values are available only to the Java method, not to the client application.
Output parameters are not supported. A method can manipulate the data it receives from a JDBC connection, but the only value it can return to its caller is a single return value declared as part of its definition.