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
What are the new features in sql server 2016?
How to recover from sql injection? : sql server security
You have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem?
What is a view in sql?
How do I run sql server 2014?
Explain about unique identifier data type in sql server?
What is global temp table?
Do you know what is xpath?
If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security
Do I need a report server to run reports in my application?
What is "scheduled jobs" or "scheduled tasks"?
1. Tell me your daily activities 2. If sql server installation fails at time installation what will do 3. Where does the sql server installation log details are stored 4. After the installation what will you do for memory configuration 5. What is the difference between SQL max maximum memory and AWE memory 6. How will you configure AWE memory 7. How will setup an email alert for the backup job 8. After the SQL installation what are the jobs will you configure 9. What does –g mean in the sql startup parameter 10. What is the difference between Bulked log and Full recovery model 11. What is the difference between mirroring and log shipping 12. What are the steps to be followed before in-place up gradation 13. After installing the patch the sql server does not start and application team tells to rollback the changes .In this scenario what will you do
What is sql server locking?
explain different types of joins? : Sql server database administration
How many database files are there in sql server 2000?what are they?