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 user-defined function? Explain its types i.e. Scalar and inline table value user-defined function?

906


What are parameterized reports?

200


Why we use the openxml clause?

1012


What is the difference between resultset and resultsetmetadata?

972


How to provide column names in insert statements in ms sql server?

1158


How can I check if a view exists in a sql server database?

1039


What is subquery? Explain the properties of a subquery?

988


Where do we use trace frag?

1017


What are security principals used in sql server 2005?

988


What is the difference between for auto and for nested?

1004


What is indexed view?

980


What is oltp (online transaction processing)?

1009


How to get a list all databases on the sql server?

1103


Is mysql the same as sql server?

988


What is the advantage of sql server?

1034