title: What will be the query to fetch the order id of a particular order from a database
body: <p>What will be the query to fetch the Goal_id of  a particular Goal_name from a database Imagine one column is of Goal_id and another column is of Goal_name<a href="https://i.stack.imgur.com/ugCji.png" rel="nofollow noreferrer">enter image description here</a> .I want it in below format(native query)</p>
  
  <pre><code>@Query("Select a from UserEntity a where a.userId= :userId")    
  List&lt;UserEntity&gt; getUserById(@Param("userId") String userId);
  </code></pre>
  
  <p>I want to use this in spring boot where i will get a order number from UI and i want to fetch the corresponding order id of that order number</p>