title: My sql order by - Error Code: 1064. You have an error in your SQL syntax;
body: <p>I am switching from ms sql to my sql , but i am getting a error for a simple order by statement. Cannot figure out whats wrong here .</p>
  <p>Error message is &quot;Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11&quot;</p>
  <pre><code>create  PROCEDURE usp_get_orders
  (
  in p_search_text varchar(255),
  out p_exit_status int 
  )
  BEGIN
      
      
       select * 
       from orders   
       order by order_number desc;
  
  
    set p_exit_status = 1;
     
  END;
  </code></pre>