title: How to write an Oracle procedure with a select statement (Specifically on SQL Developer)?
body: <p>I want to create a simple Oracle Stored procedure on SQL Developer that will return some records on a  simple select query. I do not want to pass in any parameter, but I just want the Records to be returned back from the procedure into a result set -> a suitable variable.</p>
  
  <p>I have been trying to use the following syntax : </p>
  
  <pre><code>create or replace PROCEDURE Getmarketdetails2(data OUT varchar2)
  IS
  BEGIN
  
    SELECT *
    into data
    from  dual;
  
  END Getmarketdetails2;
  </code></pre>
  
  <p><strong>But it gives me an error while I try to execute with the following exec statement</strong> --> </p>
  
  <pre><code>Declare a Varchar2;
  exec Getmarketdetails2(a);
  </code></pre>
  
  <p><strong>Error:</strong> PLS-00103: Encountered the symbol "end-of-file" when expecting "something else".</p>
  
  <p><strong>Cause:</strong>    Usually a PL/SQL compilation error.</p>
  
  <p>Appreciate if anyone can help me out of this long pending situation! I have tried enough to find a basic guide to create a simple Oracle stored procedure and execute it in SQL Developer, but none of them answer to the point!! </p>