Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE show @faculty VARCHAR(20)
- AS
- BEGIN
- SELECT * FROM tutor
- WHERE title LIKE @faculty+'%'
- END
- The procedure execution:
- EXEC show 'FI'
- create table tutor as select 1 as id, 'FI bla bla' as title from dual;
- create or replace procedure show(prefix varchar2) as
- begin
- for myrow in (select * from tutor where title like prefix || '%') loop
- dbms_output.put_line('row=' || myrow.id || ',' || myrow.title);
- end loop;
- end show;
- /
- exec show('FI');
- row=1,FI bla bla
Add Comment
Please, Sign In to add comment