JDBC - PreparedStatement , DBConnectionPool
2007. 7. 31.
1.PreparedStatement 클래스 Stetement 클래스의 업그레이드가 PreparedStatement 클래스라 보면 될 것이다. Stetement 클래스에서 insert문을 수행한다고 보자..(예로 3개의 문장) String query1 = "insert문"; String query2 = "insert문"; String query3 = "insert문"; 이렇게 선언을 해서 사용할 것이다... 이런 불필요한 SQL문의 낭비를 막기 위해 사용하는 것이 PreparedStatement 클래스이다.. String query="INSERT INTO student (no,name,major) VALUES (?,?,?)"; PreparedStatement pst=connection.prepareStat..