The point of a PreparedStatement is that the PreparedStatement and parameters are sent to the SQL server separately, where they're compiled into the actual SQL statement to use. That way, reusing the same PreparedStatement speeds up the execution time of the SQL statement, because it's already been compiled. The SQL server only needs to plug the new parameters in.
So I don't think the client is actually aware of the final form of the SQL statement.
The best you could do is a toString() on the PreparedStatement.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.