I have the below select for update query -
String test = "SELECT * FROM " + table_ + " WHERE " " FOR UPDATE ";
PreparedStatement pst = con.prepareStatement(test);
How do I avoid SQL injection in this case? I know using a parameterized query helps, but looking at my query, I have no idea how to parameterize it :( Any suggestions/examples for a select for update query to avoid SQL injection?