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
How many types of dimensions are there and what are they? : sql server analysis services, ssas
Describe how to use linked server?
Explain log shipping?
What do you mean by cardinality?
What is nolock hint in sql server 2008
what is a mixed extent? : Sql server administration
Explain about unique identifier data type in sql server?
What are clustered and non-clustered index?
What is an active database?
How is a full-text index updated?
What are the general features of sql server management studio? : sql server management studio
What is sql server used for?
How to add code to the existing article (using improve article)?
What are .mdf files?
Can a table be moved to different filegroup?