title: How do I execute a stored procedure without parameters in JDBC?
body: <p>I'm trying to execute a stored procedure without input variables like : </p>
  
  <pre><code> String  sql2 = "{call vivek}" ;
   System.out.println(sql2);
   System.out.println("Executing procedure without parameters");
   stmt = conn.createStatement();
   stmt.executeQuery(sql2);
  </code></pre>
  
  <p>But its throwing an error saying : </p>
  
  <pre><code>syntax error at or near "{"
    Position: 1
  </code></pre>
  
  <p>I'm trying to google it but not able to find anything. How do I do it ? By the way it didn't work with callablestatement also</p>