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...

If I have a table T with 4 rows & 2 columns A & B. A has
values 1,2,3,4. and B has 10,20,30,40. Write an Update SQL
query which can Swap the values of A & B for all records.
(Do not use a sub-query)

Answer Posted / preeti mishra

update T
set A:=A+B,
B:=A-B,
A:=A-B;

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pl sql package?

1071


what is a field in a database ? : Sql dba

1095


What are the two characteristics of a primary key?

1029


Which is faster count (*) or count 1?

1087


what are the advantages of sql ? : Sql dba

1105


What is difference between hql and sql?

1161


Why coalesce is used in sql?

1063


What are the types of subqueries?

1099


What does (+) mean in sql joins?

1116


Is sql better than excel?

1224


What is audit logout in sql profiler?

1073


Why select is used in sql?

1068


Which join is like inner join?

1085


How to take user input in pl sql?

1201


What is the default isolation level in sql server? : Transact sql

1080