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 are unicode character string data types in ms sql server?

1142


Can sql server 2016 run on windows 7?

861


Write a sql query to delete duplicate records from a table called table1

973


What is buffer cash and log cache in sql server?

1054


What does this statement do @@rowcount?

925


How do triggers work?

879


What is log cache in sql server?

982


Explain collation?

1003


What are the characteristics of modern DBMS?

1030


Is oracle faster than sql server?

889


how do you implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql server database administration

1012


You are designing a strategy for synchronizing an SQL Azure database and multiple remote Microsoft SQL Server 2008 databases. The SQL Azure database contains many tables that have circular foreign key relationships?

119


What are the different types of locks in the database?

872


What are views used for?

967


How to optimize stored procedures in sql server?

1122