title: ACCEPT statement in Oracle PL SQL
body: <p>I am a beginner in PL SQL.</p>
  
  <p>I'm trying to accept a string in a variable using the PL SQL ACCEPT statement.
  Here is the code - </p>
  
  <pre><code>ACCEPT lastname CHAR FORMAT 'A20' PROMPT 'Enter employee lastname:  '
  DECLARE
  BEGIN
  
  DBMS_OUTPUT.PUT_LINE(lastname);  
  END;
  </code></pre>
  
  <p>I'm not getting any error or output in SQL Developer. I am not able to understand what am I missing here.</p>
  
  <p>Basically, what I am trying to do is read a value (String) from a user and use that in my queries against a table. </p>