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 are numeric data types? : Sql dba

1046


Do we need commit after truncate?

1063


What does pl sql developer do?

912


Explain foreign key in sql?

1006


What is index example?

991


What is the syntax and use of the coalesce function?

1141


How do I count records in sql?

977


Which is faster view or stored procedure?

933


What are different types of statements supported by sql?

1144


Is mariadb nosql?

1026


What is normalization? How many normalization forms are there?

1064


Can we join more than 2 tables in sql?

1000


What do you understand by pl/sql cursors?

1070


How does stored procedure reduce network traffic?

994


Which nosql database is best?

962