public class Main { public static void main(String[] argv) throws Exception { Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/jdbctutorial",
"root", "root");
Statement st = con.createStatement(); int n = st.executeUpdate("ALTER TABLE mytable DROP INDEX col");
System.out.println("Query OK, " + n + " rows affected.");
}
}