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

Explain the rollback statement?

574


What is linq to sql?

552


Difference between truncate, delete and drop commands?

559


What does subquery mean in sql?

542


Can you do multiple joins in sql?

548






Can a procedure in a package be overloaded?

546


How do you change a value in sql?

556


What is the difference between inner join and left join?

547


Can we use pl sql in sql server?

541


how can we destroy the cookie? : Sql dba

557


What is function and procedure?

567


What is the difference between python and sql?

524


What is prepared statement in sql?

547


How many commands are in sql?

525


what is the difference between where clause and having clause? : Sql dba

539