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 / madhu sudhan g
Hiii Lets take a table Test contains one field No having 8
rows in that 4 rows are with 0's and 4 rows with 1's to update
Update Test
SET No=case when 1 then o
else 1
ENd
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are unicode character string data types in ms sql server?
Can sql server 2016 run on windows 7?
Write a sql query to delete duplicate records from a table called table1
What is buffer cash and log cache in sql server?
What does this statement do @@rowcount?
How do triggers work?
What is log cache in sql server?
Explain collation?
What are the characteristics of modern DBMS?
Is oracle faster than sql server?
how do you implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql server database administration
You are designing a strategy for synchronizing an SQL Azure database and multiple remote Microsoft SQL Server 2008 databases. The SQL Azure database contains many tables that have circular foreign key relationships?
What are the different types of locks in the database?
What are views used for?
How to optimize stored procedures in sql server?