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 / madhu sudhan g
Hiii Lets take a table Test contains one field No having 8
rows in that 4 rows are with 0's and 4 rows with 1's to update
Update Test
SET No=case when 1 then o
else 1
ENd
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is standby servers? Explain types of standby servers.
Can we call stored procedure in view in sql server?
What is mean by dml?
what are the disadvantages of cursors? : Sql server database administration
Do you know the policy based administration feature of sql server 2008?
What is the security principal at the database level that represents your session?
What is microsoft sql server?
What happens if an integer is too big for int date type?
Tell me what is use of except clause? How it differs from not in clause?
Why would you call update statistics?
What are the different normalization forms?
What is the maximum length of an alert name?
What is partition index in sql server?
Which is the main third-party tool used in sql server?
Why we use functions in sql server?