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 difference between joins and subqueries?

1120


What happens if you are trying to access a schema not owned by you?

968


Explain the microsoft sql server delete command? : SQL Server Architecture

1087


Mention the differences between local and global temporary tables.

1044


How to convert a numeric expression from one data type to another?

1017


Explain filtered indexes?

1002


Do you know how to send email from database?

1005


What is a raid and what are different types of raid configurations?

1267


What is the difference between truncate and delete commands?

1068


What is cursor in ms sql server?

1150


Can group functions be used in the order by clause in ms sql server?

1014


What is analysis service repository?

1024


What are examples of triggers?

1088


How to count duplicated values in a column in ms sql server?

1095


What is the parse query button used for?

1039