SQL> accept a prompt 'Enter First value : '
Enter First value : 17
SQL> accept b prompt 'Enter Second Value : '
Enter Second Value : 21
SQL> declare
  2  x number(2);
  3  y number(2);
  4  begin
  5  x:=&a;
  6  y:=&b;
  7  if (x>y) then
  8     dbms_output.put_line('Largest No '||x);
  9  else
 10     dbms_output.put_line('Largest No '||y);
 11  end if;
 12  end;
 13  /
old   5: x:=&a;
new   5: x:=17;
old   6: y:=&b;
new   6: y:=21;
Largest No 21

PL/SQL procedure successfully completed.
Advertisements