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 rebuild the master database?
Define self join?
Beginning with sql server version 7 0, a new enhanced data type nchar was added what type of data is supported with this data type?
What is clustered primary key?
How to replace the Query Result 'Null Value' with a text ?
What is use of @@ spid in sql server?
How do you open a cluster administrator?
What do you mean by a Composite primary key?
What is TDS(Tabular Data Stream) Gateway?
What is the difference between left and right outer join?
What is xml datatype?
Why are views required in the sql server or in any other database?
how to restart sql server in single user mode? How to start sql server in minimal configuration mode? : Sql server database administration
What are different types of data sources?
Mention the differences between substr and charindex in sql server.