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 the different types of backups available in sql server? : Sql server database administration
What are “lost updates”?
What is the maximum size of sql server database?
Explain what are the different index configurations a table can have?
Does view occupy space?
How global temporary tables are represented and its scope?
What is query optimization process?
What is the default fill factor value?
what is a correlated sub-query? : Sql server database administration
What is a user-defined function in the sql server and what is its advantage?
What are security principals used in sql server 2005?
Suggest a method of joining two tables.
What is pessimistic concurrency?
What is Replication?
How to rebuild the master database?