Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Can we use update in sql function?

1055


What is record variable?

986


What is the difference between view and stored procedure?

959


does sql support programming? : Sql dba

1037


What is the mutating table and constraining table?

1024


What is the difference between rename and alias?

1341


What is db journal file?

1058


What is the difference between sql and mysql?

1115


how is exception handling handled in mysql? : Sql dba

1075


what is 'mysqlshow'? : Sql dba

1022


explain normalization concept? : Sql dba

1045


What is a mutating table and a constraining table?

1107


What is embedded sql in db2?

1013


Can I copy :old and :new pseudo-records in/to an oracle stored procedure?

1205


Is sql better than excel?

1149