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 / krishna reddy l

update example set column1 = case when column1=0 then 1
when column1=1 then 0 end

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you optimize a stored procedure optimization?

1013


What are constraints?

985


What are Row versions of DataRow?

1006


What are the advantages of user-defined functions over stored procedures in sql server?

1014


What is row_number()?

968


How do clustered indexes store data?

1085


What is dirty page?

952


What is checkpoint process in the sql server?

1003


What is the data tier application?

169


How to check if a table is being used in sql server?

941


While you are inserting values into a table with the insert into .. Values option, does the order of the columns in the insert statement have to be the same as the order of the columns in the table?

963


What do you mean by tablesample?

1063


How to stop log file growing too big?

996


What is the difference RDBMS and Graph Database?

1034


What is the default value of an integer data type in sql server 2005?

941