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 query cache in mysql? : Sql dba

1081


Explain sql data types?

1145


What is hibernate and its relation to sql?

1171


How do you delete data from a table?

1104


What are the different types of joins in sql?

1914


What is the difference between sql, mysql and sql server?

1177


What is the use of desc in sql?

1022


how can we find the number of rows in a table using mysql? : Sql dba

1130


What is the difference between view and stored procedure?

1003


What is the function that is used to transfer a pl/sql table log to a database table?

1069


What are different categories of sql commands?

1198


what is row? : Sql dba

1277


What is sql select statement?

1088


How to change the order of columns in Oracle SQL Plus ?

1103


What is inner join in sql?

1139