用java在单个语句中执行的多个查询
"SELECT FROM * TABLE;INSERT INTO TABLE;"
String url = "jdbc:mysql://localhost:3306/"; String dbName = "databaseinjection"; String driver = "com.mysql.jdbc.Driver"; String sqlUsername = "root"; String sqlPassword = "abc"; Class.forName(driver).newInstance(); connection = DriverManager.getConnection(url+dbName, sqlUsername, sqlPassword);
MMMHUHU