我開始將MySQL與JDBC一起使用。Class.forName("com.mysql.jdbc.Driver");conn = DriverManager.getConnection("jdbc:mysql:///x", "x", "x");stmt = conn.createStatement();stmt.execute( "CREATE TABLE amigos" + "("+ "id int AUTO_INCREMENT not null,"+ "nombre char(20) not null,"+ "primary key(id)" + ")");我要創(chuàng)建3-4張桌子,看起來不太好。有沒有辦法從MySQL JDBC運行.sql腳本?
使用MySQL和JDBC運行.sql腳本
滄海一幻覺
2019-10-08 10:12:02