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
What happens if null values are involved in bitwise operations?
What are the types of joins in sql?
Explain log shipping?
In one interview...interviewer ask me question pleas tell me sql server architecture.. can any body tell me the sql server architecture with digram
How to grant a permission in ms sql server using "grant execute" statements?
What is use of attributehierarchyenabled? : sql server analysis services, ssas
What is inner join in sql server joins?
How to use go command in "sqlcmd"?
Explain about merge replications?
How do we synchronize On-Premise SQL server with SQL Azure?
What are the restrictions while creating batches in sql server?
Can primary key be null?
What specific conditions database should meet, before you can bulk copy data into it using bcp?
What are rows and columns?
Explain the dirty pages?