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
How can a user-defined datatype be created?
Explain about system database?
How to find the service pack installed? : sql server database administration
How can you start sql server in different modes?
Explain the properties of subqueries in sql server?
What are different types of raid levels?
Explain a join?
How can we delete Duplicate row in table?
What is default constraint?
Define Wed Edition in SQL Azure?
Why we use trigger in sql server with example?
Explain insert into select statement?
How to set database to be single_user in ms sql server?
Explain about sql server login?
How many primary keys are possible in a table?