Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.sql.Connection;
import java.sql.PreparedStatement;

public class Main {
    public static void main(String[] argv) throws Exception {
        Connection con = null;
        PreparedStatement prepstmt;
        prepstmt = con.prepareStatement("DELETE FROM tCust " + " WHERE custId = ?");

        prepstmt.setString(1, "1");
        prepstmt.executeUpdate();

        prepstmt.close();
        con.close();
    }
}