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 / shaheem ck
UPDATE <tablename>
SET <columnname> = DECODE(<columnname>,0,1,
1,0,
<columnname>);
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
How can I change procedure name in sql server?
What is a mixed extent?
What is a ddl statement?
What is difference between standardization and normalization?
What area unit the various kinds of info compression introduced in sql server 2008?
How to create a new table in a given schema?
Explain important index characteristics?
What are the five characteristics of good data?
What is sparse columns of sql server 2008?
If you want to send some data from access database to sql server database. What are different component of ssis will you use?
What is lookup override?
Using the customer, and order table in northwind database, please write a query to produce xml?
What command would you use to create an index?
Can primary key be null?
What is the difference between char and varchar2 datatype in sql?