set Null value for PreparedStatement - Java JDBC

Java examples for JDBC:PreparedStatement

Description

set Null value for PreparedStatement

Demo Code


//package com.java2s;

import java.sql.PreparedStatement;

import java.sql.SQLException;

public class Main {
    private static int setNull(PreparedStatement stmt, int index)
            throws SQLException {
        stmt.setNull(index++, java.sql.Types.NULL);
        return index;
    }// ww w. j  a v  a  2s  . com
}

Related Tutorials