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 / madhu sudhan g

Hiii Lets take a table Test contains one field No having 8
rows in that 4 rows are with 0's and 4 rows with 1's to update

Update Test
SET No=case when 1 then o
else 1
ENd

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is resource governor?

974


what is a sub-report?

140


what types of replication are supported in sql server? : Sql server database administration

1046


Explain what is scheduled job and how to create it?

957


What are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture

1005


What does dml stand for?

948


What happens to a trigger with multiple affected rows?

945


What is the significance of null value and why should we avoid permitting null values?

988


How do you rebuild an identity column?

949


Explain can you implement data mining in ssrs?

158


What are the underflow and overflow behaviors on float literals?

1113


Can primary key be a foreign key?

1058


How to use wildcard characters in like operations in ms sql server?

1138


Can you explain about buffer cash and log cache in sql server?

948


How do I create an extended event in sql server?

952