Hey I have problem with preparedStatement, I want to find min for few columns, I'm iterating over the names of columns and inserting them inside my preparedStatement like that
connection.prepareStatement("SELECT min( ? ) as min FROM test");
minStatement.setString(1, "some_column");
and when retrieving from ResultSet I'm getting the column name, in this case the result is "some_column" and should be 0. When using normal statement it does return right value. I have no idea what I'm doing wrong. Thanks for any help.