title: Why am I getting column not found in my SQL query?
body: <p>I am trying to get data from my SQL database, but I get an error that says the 'Student_ID' Column doesn't exist although it does exist in the database.</p>
  
  <p>Here is what I am doing:</p>
  
  <pre><code>public String[] getWeightedMarks(String s)
  {
      int h = Integer.parseInt(s);
  
      String query = "SELECT md.Weighted_Marks FROM marks_details md " +
               "WHERE md.Student_ID = " + h;
  
      List&lt;String&gt; obj = new ArrayList&lt;String&gt;();
  
      try
      {
          ResultSet rs = stmt.executeQuery(query);
  
          while (rs.next())
          {
              obj.add((rs.getString("Weighted_Marks")).toString());
          }
      }
      catch(SQLException e)
      {
          System.out.println("Problem in Query");
          e.printStackTrace();
      }
  
      String[] a = (String[]) obj.toArray(new String[obj.size()]);
  
      return a;
  }
  </code></pre>
  
  <p>Here is the error I am getting:</p>
  
  <pre><code>Problem in Query
  java.sql.SQLException: Column 'Student_ID' not found.
  </code></pre>
  
  <p>Here is the screenshot of my Database and I am connected to this db:</p>
  
  <p><a href="https://i.stack.imgur.com/GHVaW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GHVaW.jpg" alt="enter image description here"></a></p>