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
Is it true that rules do not apply to data already existing in a database at the time the rule is created?
What is a rownum?
Mention a few common trace flags used with sql server?
Why I am getting this error when dropping a database in ms sql server?
Explain Reporting Life Cycle?
As per your opinion what are the five top responsibilities of a dba? : sql server database administration
What is statement level trigger?
Where is trigger in sql server?
Does an index slow down updates on indexed columns?
Equi join and non equi join is possible with sql server?
when would you go for denormalization? : Sql server database administration
What are the different types of join?
What are .mdf files?
Explain use of expression builder.
Explain the different types of joins?