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

How many types of relationship are there?

1016


How do I count records in sql?

979


Do ddl statements need commit?

958


How do I find duplicates in sql?

915


What are the two types of exceptions in pl/sql?

1027


Is primary key an index?

985


how to select unique records from a table? : Sql dba

1092


What is primary key secondary key alternate key candidate key?

1016


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2001


What is the difference between a procedure and a function?

1084


What is the clause we need to add in function body to return variable?

1002


How do you use a while loop in pl sql?

997


Is it possible to create the following trigger: before or after update trigger for each row?

1273


How is a process of pl/sql compiled?

1134


What is mdb stand for?

995