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 are numeric data types? : Sql dba
Do we need commit after truncate?
What does pl sql developer do?
Explain foreign key in sql?
What is index example?
What is the syntax and use of the coalesce function?
How do I count records in sql?
Which is faster view or stored procedure?
What are different types of statements supported by sql?
Is mariadb nosql?
What is normalization? How many normalization forms are there?
Can we join more than 2 tables in sql?
What do you understand by pl/sql cursors?
How does stored procedure reduce network traffic?
Which nosql database is best?