title: java sql SQLException: Parameter index out of range (1 > number of parameters, which is 0)
body: <p>I keep getting this error when trying to connect to the database.</p>
  
  <p>This is my prepared statement</p>
  
  <pre><code>String SQL = "SELECT * FROM `?` WHERE `HomeTeam` = '?'";
          PreparedStatement prepst;            
  
          prepst =  con.prepareStatement(SQL);
          prepst.setString(1,box1.getSelectedItem().toString());
          prepst.setString(2,box1.getSelectedItem().toString());
          rs = prepst.executeQuery();
  </code></pre>
  
  <p>Anyone know why I get this error?</p>