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 / vernold
Update Table1 Set Column = case when Column = 1 then 0
when column = 0 then 1
| Is This Answer Correct ? | 5 Yes | 7 No |
Post New Answer View All Answers
Explain something about security and SQL Azure?
What are sub reports and how to create them?
Define inner join? Explain with an example?
Which is faster statement or preparedstatement?
Where in ms sql server is ’100’ equal to ‘0’?
Explain query editor regions
explain the difference between oracle- sql and sql server sql ? if both are same y we r using 2 sw.s?
What are the types of subscriptions in SQL Server replication?
Can we check locks in database? If so, how can we do this lock check?
What are the restrictions while creating batches in sql server?
what is spatial nonclustered index
How to connect sql server management studio express to sql server 2005 express?
What are key constraints?
How to use subqueries with the exists operators in ms sql server?
Do you know spatial data types - geometry and geography in sql server 2008?