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

Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?

1058


What do you understand by the data quality services in sql server?

948


what is the difference between count(*) and count(1) ?

1083


Can we hide the definition of a stored procedure from a use?

1220


What is set nocount on?

938


What is difference between rollback immediate and with no_wait during alter database?

1089


What is wide table?

948


What is the purpose of optimization?

994


List out the differences between global and local temp tables in sql server?

1058


How to create a login account in ms sql server to access the database engine using "create login" statements?

1140


Does the unique constraint create an index?

1056


Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?

1184


What is sqlservr.exe - process - sql server (sqlex?press)?

1107


What is a sql join?

1018


What are the requirements on sql server network connections?

982