I'm using Apache Derby. I want to extract the query from the JDBC program. I know that the questions in these lines have been asked (How can I get the SQL of a PreparedStatement?). But this question is specific to Apache Derby.
PreparedStatement stmt = conn.prepareStatement(
"SELECT * FROM EMPLOYEE
WHERE SALARY BETWEEN ? AND ?");
stmt.setInt(1, 1000);
stmt.setInt(2, 100000);
Edit
After this point in the above code snippet is there way to get the actual query without executing in the DB?
I do not want to execute PreparedStatement
in the DB. i.e without using stmt.execute() or stmt.executeQuery()