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 / avi007
select A as "B",B AS "A" from T;
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
How to use boolean type in select statement?
How do I count rows in sql query?
Why select is used in sql?
Is sql difficult?
Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?
What is blind sql injection?
How do you modify a column in sql?
How would you reference column values before and after you have inserted and deleted triggers?
What is the use of %rowtype?
What is the purpose of using pl/sql?
What are some emotional triggers?
What is scope and visibility in PL/SQL?
How can you load multi line records? : aql loader
What is the most common sql injection tool?
What is the process of debugging?