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 saini

Update (tablename) set (coulmn name)=1 where (coulmn name)
=0

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to insert multiple rows with one insert statement in ms sql server?

582


What is optimization and its types?

527


What is single-user mode?

514


What is built-in/administrator?

567


What is resource governor in sql server?

539






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

591


can a database be shrunk with users active? : Sql server administration

557


What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration

598


What is a file group?

605


What is the contrast amongst drop and truncate?

550


How to remove duplicate rows from table?

587


Explain different types of Normalization.

590


What is the difference between Clustered and Non-Clustered Index?

585


What different steps will a sql server developer take to secure sql server?

493


Why it is recommended to avoid referencing a floating point column in the where clause?

532