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
Define Joins?
List out some of the requirements to set up a sql server failover cluster?
What are joins in sql and what are the different types of joins?
Explain indexed views?
What is parameterized reports in ssrs ?
Do you know what is user defined datatypes and when you should go for them?
What is difference between rownum and row_number?
How will you go about resolving deadlocks?
Explain the properties of the relational tables?
What is checkpoint in sql server?
When columns are added to existing tables, what do they initially contain?
what is dbcc? : Sql server database administration
How to recompile stored procedure at run time?
Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?
What is clr ddl trigger?