title: java.sql.SQLSyntaxErrorException: Unknown column 'id' in 'where clause'
body: <p>excuse me, this is the first time I have asked a question on this platform.</p>
  <p>I am generating a code in Java to be able to make a query in a database, but when I send a call with select * from where I get the following error:</p>
  <pre><code>java.sql.SQLSyntaxErrorException: Unknown column 'id' in 'where clause'
  </code></pre>
  <p>I don't know what the correct syntax must be so that it doesn't generate that error. It should be noted that I am using MySQL version 8.0.2, in case that is important. I attach the part of the code where it is giving me problems. Thank you very much, I hope you can help me.</p>
  <pre><code>public Cliente buscarCliente(int id) {
      Cliente c = new Cliente();
      String sql = &quot;select * from Cliente where id = ? limit 1&quot;;
      PreparedStatement stm = null;
      Connection con = Conexion.init();
      ResultSet rs = null;
      
      try {
          stm = con.prepareStatement(sql);
          stm.setInt(1, id);
          rs = stm.executeQuery();
          while(rs.next()) {
              c.setClienteID(rs.getInt(&quot;ClienteID&quot;));
              c.setClienteNombre(rs.getString(&quot;ClienteNombre&quot;));
              c.setClienteDirección(rs.getString(&quot;ClienteDireccion&quot;));
              c.setClienteRFC(rs.getString(&quot;ClienteRFC&quot;));
              c.getFechaNac(rs.getDate(&quot;FechaNac&quot;));
          }
          rs.close();
          stm.close();
          
      } catch (SQLException ex) {
          Logger.getLogger(ClienteDAO.class.getName()).log(Level.SEVERE, null, ex);
      }
      return c;
  }
  </code></pre>