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

GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?

3110


what is offset-fetch filter in tsql? : Transact sql

1000


Is inner join faster than left join?

1251


What is optimistic concurrency control? : Transact sql

1032


How do you use a while loop in pl sql?

1056


Is sql developer case sensitive?

1048


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

1146


Do we need to create index on primary key?

966


Is vs as in pl sql?

1038


What is the difference between syntax error and runtime error?

1185


Is sql a programming?

1028


Write a sql query to find the names of employees that begin with ‘a’?

1058


Can you join views in sql?

996


What is rownum in sql?

1095


How to combine two stored procedures in sql?

1326