title: Querying to Oracle DB through JDBC gives null while direct query gives the output
body: <p>I have a sql query which when I manually sends to an Oracle DB through SQLDeveloper Application gets me the output I want. But the same query returns nothing while I try to connect and query through JDBC driver why this is happening so. Please help me.</p>
  
  <p><strong>code:</strong></p>
  
  <pre><code>String sql = "select * from tablename where id='" + id + "' AND case_id = '" + case_id + "'";
  
  stmt = con.createStatement();
  rs = stmt.executeQuery(sql);
  System.out.println(sql);
  System.out.println("next = " + rs.next());
  </code></pre>
  
  <p><strong>output:</strong> </p>
  
  <pre><code>select * from tablename where id='1' AND case_id = '1000'
  next = false
  </code></pre>
  
  <p>Both connections (JDBC and SQLDeveloper) are using same username and password. So no issue of privilege or security i think.</p>