i am try to write this query, but keep getting Oracle ora-1008, NOT ALL VARIABLES BOUND error when I am trying to select a row with name like " D'Andrea Mary".
String query = "select id from users where last||', '||first = ?";
PreparedStatement pst = conn.prepareStatement(query.toString());
pst = conn.prepareStatement(query);
ResultSet rs = pst.executeQuery(query);
how to re-write this query to make it work?