Home » SQL & PL/SQL » SQL & PL/SQL » User Interaction In PL/SQL
User Interaction In PL/SQL [message #39222] Thu, 27 June 2002 03:48 Go to next message
pankaj jaju
Messages: 2
Registered: June 2002
Junior Member
My Question Is That How Can I Interact With The User In Pl/sql Programming ?
For Eg If I Want To Insert Some Names In A Table Then How Can I Do It In PL/SQL With Out Using Macros(Insert Into Tab('&name')). Or Even Say I Want 2 Numbers From User And Then I Want To Add Them. Is There A Way ? If So, Do Let Me Know.

Pankaj Jaju
Re: User Interaction In PL/SQL [message #39223 is a reply to message #39222] Thu, 27 June 2002 04:07 Go to previous message
Mahesh Rajendran
Messages: 10690
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
SQL> ed
Wrote file afiedt.buf

  1  declare
  2     first_num       number:= &first_num;
  3     sec_num         number:= &sec_num;
  4     result          number;
  5  begin
  6     result  := first_num + sec_num;
  7     dbms_output.put_line('result is '||result);
  8* end;
SQL> set serveroutput on
SQL> /
Enter value for first_num: 10
old   2:        first_num       number:= &first_num;
new   2:        first_num       number:= 10;
Enter value for sec_num: 20
old   3:        sec_num         number:= &sec_num;
new   3:        sec_num         number:= 20;
result is 30

PL/SQL procedure successfully completed.
Previous Topic: Sql query help required
Next Topic: Top values from a table
Goto Forum:

Current Time: Tue Oct 22 14:37:22 CDT 2019