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 / ajay sharma
UPDATE mytable set mycolumn = (mycolumn + 1)%2
| Is This Answer Correct ? | 21 Yes | 4 No |
Post New Answer View All Answers
What is rs.exe utility?
Find first and last day of current month in sql server
what is the difference between Tabular and Matrix report?
What is a rownum?
Explain acid?
Explain the use of containers in ssis and also their types?
List some major differences between triggers and stored procedures?
What is indexing a document?
Name the different type of indexes in sql?
What does sql server mean?
What is dirty read?
Is a null value equal to anything? Can a space in a column be considered a null value? Why or why not?
What is ddl and dml commands?
How self join is different from outer join?
How to insert multiple rows with one insert statement in ms sql server?