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

What is difference between stored procedure and trigger?

1089


What is a heap in sql?

1017


What is a Mapplet?

1081


What is the command used to fetch first 5 characters of the string?

1357


how to start mysql server? : Sql dba

1165


What is sql architecture?

1011


What are analytic functions in sql?

996


What is the source code of a program?

1024


what is the difference between a local and a global temporary table? : Sql dba

1026


Explain locks? : Transact sql

974


Which is faster view or stored procedure?

901


Why do we use sqlite?

932


What are the different ways to optimize a sql query?

910


When can we use the where clause and the having clause?

986


Explain the difference between 'between' & 'and' operators in sql

965