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 / vicky

Update test01 Set num =(case num when 1 then 0 when 0
then 1 else 3 end)

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?

1072


what is bit datatype? : Sql server database administration

963


what is denormalization? : Sql server database administration

973


What is nonclustered index on computed columns?

997


Define views.

1068


What is the primary use of the model database?

1128


How to create a stored procedure with a statement block in ms sql server?

1125


What is the use of @@spid?

1048


How does a profiler work?

993


Can you explain what is the use of custom fields in report?

1099


what is memory-optimized nonclustered indexes

1064


How to count rows with the count(*) function in ms sql server?

1059


What is the difference between cube operator and rollup operator? : SQL Server Architecture

1172


Explain transaction isolation levels in sql server?

1182


what are cursors? : Sql server database administration

1099