there are 2 variables called x and y ,x contains 1,2 and y
contains 3,4 we have to swap the values from x to y and y
to x with out using dummy variables and it can be done only
by using a single statement ? how?
Answer Posted / parivesh sinha
declare
x number:=1;
x1 number:=2;
y number:=3;
y1 number:=4;
begin
x := y1- y;
dbms_output.put_line (x);
x1 := y1+1 - y;
dbms_output.put_line (x1);
y := x +x1;
dbms_output.put_line (y);
y1 := x1+1 +x;
dbms_output.put_line (y1);
end;
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
How to sort the rows in sql.
How much ram can sql express use?
What problem one might face while writing log information to a data-base table in pl/sql?
How to pronounce postgresql?
What is sqlerrd?
How many sql commands are there?
How can we solve sql error: ora-00904: invalid identifier?
what is acid property in database? : Sql dba
What are the disadvantages of not performing database normalization?
What is update query?
What are the differences between implicit and explicit cursors?
What are the topics in pl sql?
what are the advantages and disadvantages of cascading style sheets? : Sql dba
What is the difference between the conventional and direct path loads? : aql loader
how to fetch common records from two tables? : Sql dba