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

what are different types of backups available in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

921


What are the basic features of a trigger in ms sql server?

1186


What is a db view?

893


How to set database to be read_only in ms sql server?

1001


What is the difference between truncate and delete commands?

1064


Explain the creation and execution of a user-defined function in the sql server?

1047


Can you please differentiate between a primary key and a unique key?

1005


What is index fragmentation in ms sql server?

1077


How to rename an existing table with the "sp_rename" stored procedure in ms sql server?

1027


Define master database?

1057


How to create an index on an existing table in ms sql server?

979


Is the order of columns in the set clause important in ms sql server?

968


What is the difference between function and stored procedure in sql server?

1063


Where actually sql azure database is hosted?

163


What is data set in report?

135