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 / avi007

select A as "B",B AS "A" from T;

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does sql require a server?

1055


Which tcp/ip port does sql server run?

1066


what are the security recommendations while using mysql? : Sql dba

1174


how to use myisamchk to check or repair myisam tables? : Sql dba

1012


How do I edit a trigger in sql developer?

1051


What is the difference between the repeatable read and serializable isolation levels? : Transact sql

1180


Is it possible to link two groups inside a cross products after the cross products group has been created?

1067


Define a temp table?

1075


Differentiate pl/sql and sql?

1125


Can primary key be changed?

950


How do you optimize a stored procedure in sql?

1014


how to select first 5 records from a table? : Sql dba

1021


In a distributed database system, can we execute two queries simultaneously?

1150


What is Difference Between Unique and Primary Key Constraints?

1151


Is sql better than access?

1065