The question is similar to using LIKE in SQL * PLUS , where the select statement contains the LIKE clause as follows:
select * from sometable where somecolumn LIKE 'something%';
How can the same thing be used inside the cursor? I tried using the following:
cursor c is select * from sometable where somecolumn like 'something%';
as stated above
EDIT: I need to get something as a parameter, that is, the select statement is executed in the stored procedure.
EDIT 2:
create procedure proc1 (search VARCHAR) is
cursor c is select student_name from students where student_name like 'search%';
- I know that “search%” retrieves student names containing “search for key”, but is there any other way to use such a variable.
do something;
end;
, , , ; .