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 the most restrictive isolation level? : Transact sql
How do I get sql certification?
Why having clause is used in sql?
What is $$ in sql?
Define select, insert, create, delete, update, drop keywords
What is sql in oracle?
What are inner and outer joins examples of both?
What is nosql vs sql?
What information is needed to connect sql*plus an oracle server?
How many unique keys can a table have?
how can you see all indexes defined for a table? : Sql dba
What is a function in oracle pl sql?
How many commands are there in sql?
what is sql? : Sql dba
Will truncate release space?