How does PreparedStatement help in preventing SQL injection attacks?

  • It automatically escapes special characters in the SQL query.
  • It encrypts the entire SQL query.
  • It relies on client-side validation.
  • It uses parameterized queries.
PreparedStatement helps prevent SQL injection attacks by using parameterized queries, ensuring that user input is treated as data and not executable code.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *