O'Reilly logo

Beginning Java 8 APIs, Extensions and Libraries Swing, JavaFX, JavaScript, JDBC and Network Programming APIs by Kishori Sharan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

After you have written the Java code for the stored procedure, you need to create the stored procedure in your Java DB database. Use the following command to create the give_raise stored procedure:

--Command to create a stored procedureCREATE PROCEDURE give_raise(IN person_id integer, IN raise double, OUT old_income Double, OUT new_income Double)PARAMETER STYLE JAVALANGUAGE JAVAMODIFIES SQL DATAEXTERNAL NAME 'com.jdojo.jdbc.JavaDBGiveRaiseSp.giveRaise';

You can execute the command using the ij command-line tool or NetBeans IDE. Please refer to the “A Brief Overview of Java DB” section earlier in this chapter for more details on how to execute SQL commands in Java DB.

To get the give_raise stored procedure working in Java DB, you need to install ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required