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 / vicky
Update test01 Set num =(case num when 1 then 0 when 0
then 1 else 3 end)
| Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
Can we insert data into view sql server?
How to loop through returning rows?
What are the various editions of sql server 2017 that are available in the market?
What is sql server 2000 work load governor?
What is TDS(Tabular Data Stream) Gateway?
What are the different types of collation sensitivity in sql server?
Does sql server 2016 have ssms?
What is query and its types?
Can you explain what is the use of custom fields in report?
Write a sql query to delete duplicate records from a table called table1
What are the properties of the transaction?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?
Explain the relational database management system (rdbms)?
What are the transaction properties?
Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?