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
How to delete duplicate rows?
What is triggers in ms sql server?
How to deploy the Report?
What is a synonym for manipulation?
What is federation member?
What is the fastest way to permanently delete a 1 million row table named customers?
What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration
Show Practically Sql Server Views are updatable?
Why do we use functions?
What is the use of =,==,=== operators?
How can you stop stored procedures from recompiling?
Can I run multiple instances of sql server 2000 at the same time on one computer?
What does set rowcount do?
What are the new features are introduced in sql server 2012 reporting services?
How to stop a loop early with break statements in ms sql server?