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 / vicky

Update test01 Set num =(case num when 1 then 0 when 0
then 1 else 3 end)

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we insert data into view sql server?

927


How to loop through returning rows?

1034


What are the various editions of sql server 2017 that are available in the market?

890


What is sql server 2000 work load governor?

1060


What is TDS(Tabular Data Stream) Gateway?

121


What are the different types of collation sensitivity in sql server?

1113


Does sql server 2016 have ssms?

958


What is query and its types?

915


Can you explain what is the use of custom fields in report?

1058


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

1032


What are the properties of the transaction?

1002


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?

962


Explain the relational database management system (rdbms)?

1090


What are the transaction properties?

1012


Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?

1073