Difference between Statement and PreparedStatement

前端 未结 15 1131
野的像风
野的像风 2020-11-22 02:49

The Prepared Statement is a slightly more powerful version of a Statement, and should always be at least as quick and easy to handle as a Statement.
The Prepared Stateme

15条回答
  •  花落未央
    2020-11-22 03:11

    Statement interface executes static SQL statements without parameters

    PreparedStatement interface (extending Statement) executes a precompiled SQL statement with/without parameters

    1. Efficient for repeated executions

    2. It is precompiled so it's faster

提交回复
热议问题