Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Problems on Stored Procedure

Re: Problems on Stored Procedure

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/03/14
Message-ID: <350aa1e8.8182816@192.86.155.100>#1/1

A copy of this was sent to mouyang_at_yahoo.com (if that email address didn't require changing) On Sat, 14 Mar 1998 00:50:42 -0600, you wrote:

>Hi all,
>I have some questions on PL/SQL:
>1.Is there any mechanism in pl/sql working like "macro replace"
> such as "&" used in foxpro? I donnot want to use package dbma_sql.

You just use variables for this, pl/sql is a language, not a scripting tool. For example:

declare

   my_var varchar2(10);
begin

   my_var := 'KING';   

   for x in ( select * from emp where ename= my_var ) loop

      dbms_output.put_line( x.empno );
   end loop;
end;
/

SQL*Plus allows you to write scripts with macros, so you could code in a script:



prompt Enter Ename:
accept &ename
select * from emp where ename = '&ename';

>2.When many users call a same stored procedure, Oracle schedule those
> requests running parally or serially?

In parallel.

>Any help thanks.
>
>Ouyang
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/ Now offering spam-free web-based newsreading
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Sat Mar 14 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US