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

What is the Difference Between Primary and Foreign Key?

957


Explain about builtinadministrator?

986


How to name query output columns in ms sql server?

916


What is key attribute?

869


Why the trigger fires multiple times in single login?

1152


List the different types of joins?

924


What is user-defined functions? What are the types of user-defined functions that can be created?

980


Explain about Views?

1007


What is the difference between indexing and hashing?

1078


What is change data capture (cdc) in sql server 2008?

979


What is a transact-sql statement batch in ms sql server?

945


How to declare and use cursor variables?

1073


What is the use of RDBMS?

957


You have a table ‘test’ which is a copy of northwind employee table you have written a trigger to update the field ‘hiredate’ with the current date

990


what is the system function to get the current user's user id? : Sql server database administration

953