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
How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
what is bit datatype? : Sql server database administration
what is denormalization? : Sql server database administration
What is nonclustered index on computed columns?
Define views.
What is the primary use of the model database?
How to create a stored procedure with a statement block in ms sql server?
What is the use of @@spid?
How does a profiler work?
Can you explain what is the use of custom fields in report?
what is memory-optimized nonclustered indexes
How to count rows with the count(*) function in ms sql server?
What is the difference between cube operator and rollup operator? : SQL Server Architecture
Explain transaction isolation levels in sql server?
what are cursors? : Sql server database administration