import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
public class Main {
public static void main(String[] argv) throws Exception {
String driverName = "com.mysql.jdbc.Driver";
String userName = "root";
String password = "root";
Class.forName(driverName).newInstance();
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/jdbctutorial",
userName, password);
Statement st = con.createStatement();
st.executeUpdate("DROP TABLE Employee1");
con.close();
}
}
|