CREATE TABLE t1 (
c1 INTEGER, c2 INTEGER, c3 INTEGER); CREATE PROCEDURE test_nulls( ) BEGIN Integer pvar_int ; pvar_int = null ; SQLIStatement insert_t1 = new SQLIStatement ( "INSERT INTO t1 (c1, c2, c3) values (?,?,?) "); // Set to non-null value insert_t1.setParam(1, new Integer(1)); // Set directly to null insert_t1.setParam(2, null); // Set indirectly to null insert_t1.setParam(3, pvar_int); insert_t1.execute(); END |