preparedstatement
-
statement vs prepared statement vs callable statement interfaceCS 지식/데이터베이스(Database) 2023. 5. 4. 23:10
SQL 실행 단계 1) Parsing(쿼리 문장 분석) 2) Compile 3) Execute(실행) Statement - used to execute string-based SQL queries - SQL string을 concatenate 하기 때문에 less readable public void insert(PersonEntity personEntity) { String query = "INSERT INTO persons(id, name) VALUES(" + personEntity.getId() + ", '" + personEntity.getName() + "')"; Statement statement = connection.createStatement(); statement.executeUpdat..