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
Which command is used to call a stored procedure?
What is the use of triggers?
Can we insert in sql function?
What is Collation Sensitivity ? What are the various type ?
explain what is mysql? : Sql dba
What do you understand by exception handling in pl/sql?
Why do we create views in sql?
what is the difference between delete and truncate commands? : Sql dba
Is left join and outer join same?
What do you think about pl/sql?
How do you declare a user-defined exception?
what are the performance and scalability characteristics of mysql? : Sql dba
What is full form of rtm?
what is subquery? : Sql dba
Why is sql better than hql?