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 the most restrictive isolation level? : Transact sql

1082


How do I get sql certification?

965


Why having clause is used in sql?

976


What is $$ in sql?

984


Define select, insert, create, delete, update, drop keywords

1043


What is sql in oracle?

1058


What are inner and outer joins examples of both?

952


What is nosql vs sql?

1174


What information is needed to connect sql*plus an oracle server?

1026


How many unique keys can a table have?

1010


how can you see all indexes defined for a table? : Sql dba

990


What is a function in oracle pl sql?

1035


How many commands are there in sql?

1026


what is sql? : Sql dba

1021


Will truncate release space?

940