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...

Consider a table with 8 rows 4 rows contains value 0 and 4
rows contains value 1.Now write a single update query to make
all 0's as 1 and all 1's as 0

Answer Posted / shaheem ck

UPDATE <tablename>
SET <columnname> = DECODE(<columnname>,0,1,
1,0,
<columnname>);

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is logon trigger?

1156


What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?

1180


Explain how many types of relationship?

1084


What extended events?

1062


What is data file in computer?

1000


when would you go for denormalization? : Sql server database administration

911


When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?

999


Can we call stored procedure in trigger?

997


How to insert data into an existing table?

1027


What is a rownum?

1059


What is a Join and explain its types?

1149


Explain the properties of sub-query in sql server?

1069


What are the differences between triggers and stored procedures?

1114


What is a primary key?

998


How does stuff differ from the replace function?

1064