Can I get the full query that a PreparedStatement is about to execute?
Posted
by ufk
on Stack Overflow
See other posts from Stack Overflow
or by ufk
Published on 2010-06-14T15:32:01Z
Indexed on
2010/06/14
15:42 UTC
Read the original article
Hit count: 174
I'm working with PreparedStatement
with MySQL server.
example:
String myQuery = "select id from user where name = ?";
PreparedStatement stmt = sqlConnection.prepareStatement(myQuery);
stmt.setString(1, "test");
stmt.executeQUery();
ResultSet rs = stmt.getResultSet();
How can I receive the full SQL query that is about to be executed on the MySQL server?
thanks!
© Stack Overflow or respective owner