我试图理解PreparedStatements&之间的区别CallableStatements,但我无法理解。所以请任何人都可以将以下sql查询转换为CallableStatement. 我知道如何将 Statement 转换为 aPreparedStatement但在CallableStatements.
作为一个java.sql.Statement
SELECT * FROM Customer WHERE customerId = 'C001'
作为一个java.sql.PreparedStatement
SELECT * FROM Customer WHERE customerId = ? //set customerId using preparedStatement.setString(1,"C001")
如何在CallableStatements
提前致谢!