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 / vicky saini
Update (tablename) set (coulmn name)=1 where (coulmn name)
=0
| Is This Answer Correct ? | 1 Yes | 6 No |
Post New Answer View All Answers
According to you what goes into making the best database administrator? : sql server database administration
What is transact-sql ddl trigger?
How do you identify a foreign key?
Explain the steps to use transact-sql cursor?
What is instead of trigger sql server?
When would you use the stored procedures or functions?
Explain steps of normalization?
Explain primary key and foreign key constraints?
Why use view instead of a table?
what is the maximum size of a row? : Sql server database administration
What is clustered vs nonclustered index?
What are the common performance issues in sql server?
How to find a value in another dataset based on current dataset field (ssrs 2008 r2)?
How to filter records of table in SQL SERVER?
What is proper subset of candidate key?