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 / vernold
Update Table1 Set Column = case when Column = 1 then 0
when column = 0 then 1
| Is This Answer Correct ? | 5 Yes | 7 No |
Post New Answer View All Answers
How to use values from other tables in update statements in ms sql server?
What is the recommended total size of your memory optimized tables?
What is shared lock?
What is the difference between stored procedure and functions?
What is the difference between a stored procedure and a user defined function?
Define constraints and give an example of their use?
What is executereader?
What are indexers?
What is sql server profiler trace data file?
How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?
What are the new features in SQL Server 2005 when compared to SQL Server 2000?
How do I manually uninstall an instance of sql server 2016?
How do clustered indexes store data?
What is the difference between cube operator and rollup operator? : SQL Server Architecture
How to change the system date and time from SQL Plus Terminal ?