I have a query that I want run in java:
SELECT md5(CONCAT(md5(\'{clear password}\') , \'{salt}\'));
Its for my application to connect and u
Example of prepared queries:
/*
* Some code
*/
String strSQL = "select md5(concat(md5(?),?))"
try(PreparedStatement ps = conn.prepareStatement(strSQL)) {
ps.setString(1, password);
ps.setString(2, pwdSalt);
try(ResultSet rs = ps.executeQuery()) {
rs.first();
// Do whatever you need to do
} catch(SQLException e) {
// ...
}
} catch(SQLException e) {
// ...
}
/*
* More code
*/