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 is difference between joins and subqueries?
What happens if you are trying to access a schema not owned by you?
Explain the microsoft sql server delete command? : SQL Server Architecture
Mention the differences between local and global temporary tables.
How to convert a numeric expression from one data type to another?
Explain filtered indexes?
Do you know how to send email from database?
What is a raid and what are different types of raid configurations?
What is the difference between truncate and delete commands?
What is cursor in ms sql server?
Can group functions be used in the order by clause in ms sql server?
What is analysis service repository?
What are examples of triggers?
How to count duplicated values in a column in ms sql server?
What is the parse query button used for?