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 different joins used in sql?
what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba
Write the command to remove all players named sachin from the players table.
How to connect a sql*plus session to an oracle server?
what is a materialized view? : Sql dba
What is sql rowcount?
What is t sql in sql server?
What is sql and how does it work?
Can we update views in sql?
When is the explicit cursor used ?
What are analytic functions in sql?
How to use distinct and count in sql query? Explain
What sql does db2 use?
What is row_number () in sql?
Why coalesce is used in sql?