If I have a table T with 4 rows & 2 columns A & B. A has
values 1,2,3,4. and B has 10,20,30,40. Write an Update SQL
query which can Swap the values of A & B for all records.
(Do not use a sub-query)
Answer Posted / preeti mishra
update T
set A:=A+B,
B:=A-B,
A:=A-B;
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
What is pl sql package?
what is a field in a database ? : Sql dba
What are the two characteristics of a primary key?
Which is faster count (*) or count 1?
what are the advantages of sql ? : Sql dba
What is difference between hql and sql?
Why coalesce is used in sql?
What are the types of subqueries?
What does (+) mean in sql joins?
Is sql better than excel?
What is audit logout in sql profiler?
Why select is used in sql?
Which join is like inner join?
How to take user input in pl sql?
What is the default isolation level in sql server? : Transact sql