美文网首页
statement、preparedstatement、call

statement、preparedstatement、call

作者: 丶失落叶 | 来源:发表于2019-10-21 18:27 被阅读0次

1.这三个都是接口。statement继承wrappe,prepastatement继承statement,callablestatement继承preparedstatement

2.statement接口提供了执行语句和获取结果的基本方法;

preparstatement接口增加了处理IN参数的方法;

callablestatement接口增加了处理OUT参数的方法

3.statement:普通的不带参的查询sql,支持批量更新,批量删除;

preparedstatement:可变参数的sql,预编译一次,执行多次,可以防止sql注入,支持批量更新,批量删除;

callablestatement:继承自preparedstatement,支持带参的sql操作,支持调用存储过程,提供了对输出和输入/输出参数(INOUT)的支持;

相关文章

网友评论

      本文标题:statement、preparedstatement、call

      本文链接:https://www.haomeiwen.com/subject/orcxvctx.html