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

Update Table1 Set Column = case when Column = 1 then 0
when column = 0 then 1

Is This Answer Correct ?    5 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use values from other tables in update statements in ms sql server?

1118


What is the recommended total size of your memory optimized tables?

966


What is shared lock?

907


What is the difference between stored procedure and functions?

1137


What is the difference between a stored procedure and a user defined function?

1023


Define constraints and give an example of their use?

1041


What is executereader?

957


What are indexers?

1088


What is sql server profiler trace data file?

1114


How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?

2000


What are the new features in SQL Server 2005 when compared to SQL Server 2000?

1165


How do I manually uninstall an instance of sql server 2016?

1038


How do clustered indexes store data?

1108


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

1128


How to change the system date and time from SQL Plus Terminal ?

1223