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

Differentiate between truncate vs delete in mssql?

1057


Difference between primary key and clustered index?

983


How to truncate the log in sql server 2012? : sql server database administration

1260


How to view existing indexes on an given table using sp_help?

1107


Can you change the data type of a column in a table after the table has been created? If so, which command would you use?

1001


Do you know the policy based administration feature of sql server 2008?

936


When does the auto update index statistics feature in sql server turn itself on?q) what specific conditions database should meet, before you can bulk copy data into it using bcp?

962


Are all views updatable ?

1135


How do I know if localdb is running?

931


What is CTE in SQL

929


What are the different types of stored procedures?

1099


What are the properties of primary key?

957


Define Unique Key?

986


What is database isolation in sql server? : sql server database administration

1086


Difference Between ORDER BY Clause and GROUP BY Clause in SQL?

1045