Home » SQL & PL/SQL » SQL & PL/SQL » stored procedures
stored procedures [message #18936] Thu, 21 February 2002 18:43 Go to next message
krishna
Messages: 141
Registered: October 1998
Senior Member
hi
where can i get examples of stored procedures. Not documentation but actual codes written.
thanks
bye
Re: stored procedures [message #18943 is a reply to message #18936] Thu, 21 February 2002 23:09 Go to previous message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
here is an example

create or replace procedure killuser(v_osuser varchar2) as
cursor kill_cur is
select sid,serial#,username,osuser
from v$session
where osuser=v_osuser;
v_command varchar2(300);
begin
for tmp in kill_cur
loop
v_command :='ALTER SYSTEM KILL SESSION '''||tmp.sid
||','||tmp.serial#||'''';
Execute immediate v_command;
end loop;
end;
/
Previous Topic: Re: ORA-20000 ORU-10027
Next Topic: text file and pl/sql relation
Goto Forum:
  


Current Time: Fri Sep 24 03:15:21 CDT 2021