Statement로 데이터베이스 연동 시 연동 할 때마다 DBM에서 SQL문을 다시 컴파일 해야 하므로 속도가 느리다는 단점이 있다. 반면에, PrepareStatement 인터페이스는 컴파일된 SQL문을 DBMS에 전달하여 성능을 향상시킨다. PrepareStatement 인터페이스는 실행하려는 SQL문에 '?'를 넣을 수 있다. 즉, '?' 값만 바꿔서 쉽게 설정 가능하다. Statement보다 SQL문을 작성하기가 더 간단해진다. int number = 1; String name = "라떼"; stmt = con.createStatement(); stmt.executeQuery("select * from Example where c_no = "+ number +" and c_name = '"+ na..