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

Tell me what is sql profiler?

1026


IF more than one Site is accessing the same Database server and I want to move the DB with Minimum down time? How will you do

1803


How do I change my passwords (database, LDAP, and so on) without causing an outage?

1065


How can you set the threshold at which sql server will generate keysets asynchronously?

985


What does top operator do?

1018


What is the recursive stored procedure in sql server?

1019


A user is a member of the public role and the sales role. The public role has select permission on all the tables. The sales role does not have select permission on some of the tables will the user be able to select from all tables?

957


How do I find the default sql server instance?

943


What is the maximum number of index per table?

1073


Explain comment on transactions?

980


How to use order by with union operators in ms sql server?

1020


How to loop through result set objects using odbc_fetch_row()?

976


what is the information that can be stored inside a bit column? : Sql server database administration

961


what are the new features introduced in sql server 2000? : Sql server database administration

915


What is the difference between char, varchar and nvarchar?

1022