Hi Gurus,

declare
    v_empno number:=&empno;
    v_sal number:=&sal;
    ok1 varchar(1);
begin
    dbms_output.put_line('Do you want to update the sal...(Y/N)');
        if (upper('&ok1') = 'Y') then
            update emp set sal=v_sal where empno=v_empno;
        end if;
end;

In the above code if i want to get the 'Do you want to update the
sal...(Y/N)' before the variable ok1 what should i do..
my requirement is that i will take the empno and sal first and prompt
for updating.if i enter 'Y' then i will update the sal..
else i dont.but according to the above code i am begin asked to enter
empno,sal and variable ok1 at the first instance..
pl help me about this issue...
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Vijaya Chander V.S
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to