title: Use a variable with "LIKE %" (e.g. "variable%") in PL/SQL?
body: <p>The question is similar to using <strong>LIKE</strong> in <strong>SQL *PLUS</strong>, where a select statement contains a <strong>LIKE</strong> clause as follows:</p>
  
  <pre><code>select * from sometable where somecolumn LIKE 'something%';
  </code></pre>
  
  <p>How could one use the same within a cursor? I tried using the following:</p>
  
  <pre><code> cursor c is select * from sometable where somecolumn like 'something%'; 
  </code></pre>
  
  <p><em>same as above</em> </p>
  
  <p>EDIT: I need to get <strong>something</strong> as a parameter, meaning, the select statement is executed within a stored procedure.</p>
  
  <p><strong>EDIT 2:</strong> </p>
  
  <pre><code>create procedure proc1 (search VARCHAR) is
  
  cursor c is select student_name from students where student_name like 'search%';
  </code></pre>
  
  <p>--I know using 'search%' retrieves student names containing 'the key search', but is there any other way to use such a variable.</p>
  
  <pre><code>do something;
  
  end;
  </code></pre>
  
  <p>In short, I need to select student names containing a value that is passed as a parameter; this may not be the whole name, and may suffice enough to be used within a like clause.</p>