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

What is package in pl sql with an examples?

1043


explain the advantages and disadvantages of stored procedure? : Sql dba

1015


State some properties of relational databases?

1060


What is plpgsql language?

1070


How many tables can a sql database have?

982


How do you remove duplicate records from a table?

945


What is trigger explain it?

1020


What is audit logout in sql profiler?

1030


What is user in sql?

1027


Is keyword pl sql?

1012


What are tables and fields?

1043


can a stored procedure call itself or recursive stored procedure? : Sql dba

1037


What is a variable in sql?

1007


what is a database transaction? : Sql dba

1190


What is varchar used for?

1086