开发者

How to get the Query executed using ResultSet?

I have a preparedStatement called PrepStatement which contains a Select Query like

Select a, b from abc where ab="cd".

executed below

ResultSet 开发者_运维知识库selectParams = PrepStatement.executeQuery();

Is there anyway i can get the executed Query with parameters passed from ResultSet object?

I can get it from PrepStatement object, But i want to get it from ResultSet or ResultSetMetadata.


You can't get it from any of those actually.

Hard to see why you're even asking, when you already have a solution: getting it from the PreparedStatement.


resultSet.getStatement() should give u the query and some extra information

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜