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 / bunty
UPDATE T
SET A = B,B=A;
I am surprized but above query will fetch the desired
result.
Cheers,
Bunty
Is This Answer Correct ? | 30 Yes | 1 No |
Post New Answer View All Answers
What is a database trigger?
How do I run a query in pl sql developer?
How to combine two stored procedures in sql?
What is sql server and ase?
Why trigger is used in sql?
What is java sql package?
Is sql dba a good career? : SQL DBA
What is sql resultset?
what is table? : Sql dba
What is integrity in sql?
What is the location of pre_defined_functions.
What is procedure explain with program?
What is attribute indicator in pl sql?
What is scope of pl sql developer in future?
what is denormalization. : Sql dba