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 / santhi k

IN ORACLE...

SELECT DECODE(X,X,Y)X,DECODE(Y,Y,X)Y FROM TABLENAME;

Is This Answer Correct ?    0 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention what problem one might face while writing log information to a data-base table in pl/sql?

686


What is a relationship and what are they?

587


Does oracle roll back the transaction on an error?

546


Explain the working of primary key?

618


Is foreign key mandatory?

564






What is the advantage of index in sql?

546


What is dynamic query?

545


What is difference between rank () row_number () and dense_rank () in sql?

586


What is online transaction processing (oltp)?

607


Is a view faster than a stored procedure?

555


How to create your own reports in sql developer?

548


What program will open a mdb file?

507


What is query syntax?

523


What is the difference between mdf and ndf files?

578


What is insert command in sql?

532