I know the advantages of using PreparedStatement
, which are
- query is rewritten and compiled by the database server
- protection against SQL injection
But I want to know when we use it instead of Statement
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…