[Java] JDBC mysql Statement 관련 예외

Sechan Beak·2023년 7월 14일
0
Connection con = DriverManager.getConnection(~~)
Statement st = con.createStatement();
st.executeUpdate(SQL1);
st.executeUpdate(SQL2);

이런 식으로 하나의 Statement객체에 2개 이상의 쿼리를 실행시키면 안됨.
Statement를 2개 만들어서 따로 실행시켜줘야한다.

profile
거사 하나 치르면 올림

0개의 댓글